Last active
November 9, 2018 16:53
-
-
Save adamrneary/7a1bef6de1e9bd63001a2f12a098ba77 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { TripDesignerBioFields } from './__generated__/TripDesignerBioFields'; | |
const AVATAR_SIZE_PX = 107; | |
const fragments = { | |
fields: gql` | |
fragment TripDesignerBioFields on TripDesignerBio { | |
avatar | |
name | |
bio | |
} | |
`, | |
}; | |
type Props = TripDesignerBioFields & WithStylesProps; | |
function TripDesignerBio({ avatar, name, bio, css, styles }: Props) { | |
return ( | |
<SectionWrapper> | |
<div {...css(styles.contentWrapper)}> | |
<Spacing bottom={4}> | |
<UserAvatar name={name} size={AVATAR_SIZE_PX} src={avatar} /> | |
</Spacing> | |
<Text light>{bio}</Text> | |
</div> | |
</SectionWrapper> | |
); | |
} | |
TripDesignerBio.fragments = fragments; | |
export default withStyles(({ responsive }) => ({ | |
contentWrapper: { | |
maxWidth: 632, | |
marginLeft: 'auto', | |
marginRight: 'auto', | |
[responsive.mediumAndAbove]: { | |
textAlign: 'center', | |
}, | |
}, | |
}))(TripDesignerBio); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment