Skip to content

Instantly share code, notes, and snippets.

@adamrneary
Last active November 9, 2018 16:53
Show Gist options
  • Save adamrneary/7a1bef6de1e9bd63001a2f12a098ba77 to your computer and use it in GitHub Desktop.
Save adamrneary/7a1bef6de1e9bd63001a2f12a098ba77 to your computer and use it in GitHub Desktop.
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