Skip to content

Commit

Permalink
fix(LoginPage): Fix background-image style (patternfly#937)
Browse files Browse the repository at this point in the history
  • Loading branch information
ronlavi2412 authored and dgutride committed Nov 19, 2018
1 parent 793bbe7 commit 3307e9b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const createProps = () => {
const { header, card } = englishMessages;
return {
container: {
backgroundUrl: '/some-background',
translations: { en: englishMessages, fr: frenchMessages },
alert: {
message: header.alert,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ const createProps = () => {
const { header, footerLinks, card } = englishMessages;
return {
container: {
backgroundUrl: '/some-background',
translations: { en: englishMessages, fr: frenchMessages },
className: '',
alert: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`Component matches snapshot 1`] = `
<div
class="login-pf"
style="background-image: url(null);"
style="background-image: url(/some-background);"
>
<div
class="login-pf-page "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`Component matches snapshot 1`] = `
<div
class="login-pf"
style="background-image: url(null);"
style="background-image: url(/some-background);"
>
<div
class="login-pf-page login-pf-page-accounts"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';

const LoginPageContainer = ({ backgroundUrl, className, children }) => {
const style = {
backgroundImage: `url(${backgroundUrl})`
};
const style = backgroundUrl ? { backgroundImage: `url(${backgroundUrl})` } : {};

return (
<div className="login-pf" style={style}>
Expand Down

0 comments on commit 3307e9b

Please sign in to comment.