Skip to content

Commit

Permalink
added a conditional sign out link into the header [closes homedepot#73]
Browse files Browse the repository at this point in the history
  • Loading branch information
AmlidosTHD committed Oct 29, 2019
1 parent 5dac5f1 commit c4b4bd7
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 24 deletions.
2 changes: 1 addition & 1 deletion ui/src/childinfo/ChildInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export default class ChildInfo extends Component {
let { showConfirmation, step } = this.state
return (
<>
<Header />
<Header logout={true} />
{!showConfirmation ? (
<div className="childInfo containerVertical spotlight">
<p className="progress">
Expand Down
45 changes: 25 additions & 20 deletions ui/src/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,29 @@ import MakeAWishLogo from '../assets/images/MAW_Georgia_white.png'
import RocketLogo from '../assets/images/TheSkyisTheLimitLogo.png'
import './styles.scss'

export const Header = () => (
<header>
<section className="slidingVertical header-item" style={{color: 'white'}}>
<span>Hello!</span>
<span>Bonjour!</span>
<span>Hola!</span>
<span>你好</span>
<span>こんにちは</span>
</section>
<section className="header-item">
<img
className="header-make-a-wish-logo"
src={MakeAWishLogo}
alt="Make a Wish"
/>
</section>
<section className="header-item">
<img className="header-rocket-logo" src={RocketLogo} alt="Rocket Logo" />
</section>
</header>
export const Header = ({logout}) => (
<div className="header">
<div className="toolbar">
{ logout ? <a href="/logout">Sign Out</a> : null }
</div>
<header>
<section className="slidingVertical header-item" style={{color: 'white'}}>
<span>Hello!</span>
<span>Bonjour!</span>
<span>Hola!</span>
<span>你好</span>
<span>こんにちは</span>
</section>
<section className="header-item">
<img
className="header-make-a-wish-logo"
src={MakeAWishLogo}
alt="Make a Wish"
/>
</section>
<section className="header-item">
<img className="header-rocket-logo" src={RocketLogo} alt="Rocket Logo" />
</section>
</header>
</div>
)
23 changes: 22 additions & 1 deletion ui/src/header/styles.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
header {
.header {
display: flex;
flex-direction: column;

.toolbar {
display: flex;
height: 30px;
align-items: center;
justify-content: flex-end;
padding-right: 1rem;
}

a {
color: white;
}

a:visited {
color: white;
}
}

.header header {
padding-top: 40px;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
Expand Down
2 changes: 1 addition & 1 deletion ui/src/landing/splashScreen/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const Landing = ({ name, age, updateField, selectWishType, validFields })

return (
<div id="SplashScreen">
<Header />
<Header logout={true} />
<div className="wish-input">
<span>My name is </span>
<input data-test="name-input" placeholder="enter your name" type="text" onChange={(e) => updateField(nameField, e.target.value)} value={name}/>
Expand Down
2 changes: 1 addition & 1 deletion ui/src/login/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Login extends Component {

return (
<div className="login-page">
<Header />
<Header logout={false} />
<main className="main-section">
{showSignIn ? (
<section className="form-wrapper">
Expand Down

0 comments on commit c4b4bd7

Please sign in to comment.