Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jeremeylduvall
Created December 13, 2017 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremeylduvall/b13b497f49e29d0414a6e1705e326e8b to your computer and use it in GitHub Desktop.
Save jeremeylduvall/b13b497f49e29d0414a6e1705e326e8b to your computer and use it in GitHub Desktop.
Header with dummy data
import React from 'react';
import PropTypes from 'prop-types';
import Link from 'gatsby-link';
const Header = () => {
const bio = 'Lorem Ipsum is simply dummy text that I want to appear on the screen.';
const username = 'username';
const src = 'https://www.gravatar.com/avatar/00000000000000000000000000000000?d=retro';
return (
<div
style={ {
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
flexWrap: 'wrap',
margin: '2em 2em',
} }
>
<span
style={ {
flexBasis: '120px',
height: '96px',
} }
>
<img
src={ src }
alt={ `Jeremey DuVall` }
style={ {
marginBottom: 0,
borderRadius: "50%",
width: '96px',
} }
/>
</span>
<span
style={ {
flexBasis: '500px',
flexGrow: 1,
} }
>
<Link
to='/'
activeStyle={ {
textDecoration: 'none',
color: '#000000'
} }
>
<h3
dangerouslySetInnerHTML={ { __html: ( username ) } }
style={ { marginBottom: '0.2em' } }
/>
</Link>
<p
style={ { marginBottom: 0 } }
dangerouslySetInnerHTML={ { __html: ( bio ) } }
/>
</span>
</div>
)
}
Header.PropTypes = {
src: PropTypes.string,
username: PropTypes.string,
bio: PropTypes.string,
}
export default Header;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment