|
| 1 | +import { Box, Heading, Divider, Text, Avatar, Visible } from 'paramount-ui'; |
| 2 | +import React from 'react'; |
| 3 | + |
| 4 | +import { Link } from './Link'; |
| 5 | + |
| 6 | +const LinkedInIcon = (): JSX.Element => { |
| 7 | + return ( |
| 8 | + <svg |
| 9 | + xmlns="http://www.w3.org/2000/svg" |
| 10 | + width="24" |
| 11 | + height="24" |
| 12 | + viewBox="0 0 24 24" |
| 13 | + > |
| 14 | + <path |
| 15 | + fill="#909090" |
| 16 | + fillRule="evenodd" |
| 17 | + d="M19.102 18.122h-2.837v-4.425c0-.728-.061-1.253-.183-1.577-.224-.545-.661-.818-1.312-.818-.65 0-1.108.243-1.373.728-.203.363-.305.899-.305 1.606v4.486h-2.806V9.06H13v1.243h.03c.204-.404.529-.738.976-1 .489-.324 1.058-.486 1.709-.486 1.322 0 2.247.415 2.776 1.243.407.667.61 1.698.61 3.092v4.971zM8.308 7.33c-.338.339-.74.508-1.206.508-.465 0-.868-.17-1.206-.508a1.648 1.648 0 0 1-.508-1.207c0-.465.17-.867.508-1.206.338-.338.74-.508 1.206-.508.466 0 .868.17 1.206.508.34.339.508.741.508 1.206 0 .466-.169.868-.508 1.207zm-2.43 10.793h2.938V8.816H5.878v9.306zm14.63-14.63C18.253 1.24 15.417.077 12 0 8.582.076 5.746 1.24 3.493 3.493 1.239 5.746.075 8.583 0 12c.075 3.418 1.24 6.254 3.493 8.507C5.746 22.761 8.582 23.924 12 24c3.417-.076 6.254-1.24 8.507-3.493C22.761 18.254 23.924 15.418 24 12c-.076-3.417-1.24-6.254-3.493-8.507z" |
| 18 | + /> |
| 19 | + </svg> |
| 20 | + ); |
| 21 | +}; |
| 22 | + |
| 23 | +const TwitterIcon = () => { |
| 24 | + return ( |
| 25 | + <svg |
| 26 | + xmlns="http://www.w3.org/2000/svg" |
| 27 | + width="25" |
| 28 | + height="24" |
| 29 | + viewBox="0 0 25 24" |
| 30 | + > |
| 31 | + <path |
| 32 | + fill="#909090" |
| 33 | + fillRule="evenodd" |
| 34 | + d="M19.123 8.789c.3-.226.592-.488.873-.789.282-.3.498-.6.648-.901-.488.263-1.052.432-1.69.507.6-.413 1.051-1.014 1.352-1.803-.601.376-1.295.639-2.084.789-1.09-1.09-2.338-1.305-3.747-.648-1.408.657-2 1.85-1.774 3.577-1.54-.113-2.837-.479-3.888-1.099a11.845 11.845 0 0 1-2.76-2.225 3.247 3.247 0 0 0-.254 2.48c.244.863.648 1.464 1.212 1.802-.527-.037-.978-.17-1.353-.395.037.902.282 1.606.733 2.113.45.507 1.032.873 1.746 1.099-.45.112-.901.132-1.352.056.413 1.315 1.39 2.066 2.93 2.254-.564.45-1.278.808-2.141 1.07a5.889 5.889 0 0 1-2.535.225c.676.451 1.427.817 2.253 1.099.826.282 1.784.404 2.873.366 2.705-.15 4.854-1.08 6.451-2.789 1.596-1.708 2.431-3.971 2.507-6.788M12.25 0c3.417.076 6.253 1.24 8.507 3.493 2.254 2.254 3.417 5.09 3.493 8.507-.076 3.418-1.24 6.253-3.493 8.507-2.254 2.254-5.09 3.417-8.507 3.493-3.418-.076-6.254-1.24-8.507-3.493C1.489 18.253.325 15.418.25 12c.075-3.417 1.24-6.253 3.493-8.507C5.996 1.239 8.832.076 12.25 0" |
| 35 | + /> |
| 36 | + </svg> |
| 37 | + ); |
| 38 | +}; |
| 39 | + |
| 40 | +export interface TeamMemberProps { |
| 41 | + avatarUrl: string; |
| 42 | + fullName: string; |
| 43 | + linkedInUrl: string; |
| 44 | + twitterUrl: string; |
| 45 | + bio: string; |
| 46 | + fullNameColorCode?: string; |
| 47 | +} |
| 48 | + |
| 49 | +export const TeamMember = (props: TeamMemberProps): JSX.Element => { |
| 50 | + const { |
| 51 | + avatarUrl, |
| 52 | + fullName, |
| 53 | + linkedInUrl, |
| 54 | + twitterUrl, |
| 55 | + bio, |
| 56 | + fullNameColorCode, |
| 57 | + } = props; |
| 58 | + |
| 59 | + return ( |
| 60 | + <Box |
| 61 | + paddingHorizontal={32} |
| 62 | + paddingTop={48} |
| 63 | + paddingBottom={48} |
| 64 | + borderRadius={8} |
| 65 | + backgroundColor="#fff" |
| 66 | + height="100%" |
| 67 | + > |
| 68 | + <Box flexDirection="row" paddingBottom={24} alignItems="center"> |
| 69 | + <Box width={96} alignItems="center"> |
| 70 | + <Avatar |
| 71 | + source={{ uri: avatarUrl }} |
| 72 | + size={94} |
| 73 | + overrides={{ |
| 74 | + Root: { |
| 75 | + style: { |
| 76 | + borderColor: fullNameColorCode, |
| 77 | + }, |
| 78 | + }, |
| 79 | + }} |
| 80 | + /> |
| 81 | + </Box> |
| 82 | + <Box marginLeft={16} marginTop={32}> |
| 83 | + <Visible xsmall small medium xlarge> |
| 84 | + <Heading size="xlarge" color={fullNameColorCode}> |
| 85 | + {fullName} |
| 86 | + </Heading> |
| 87 | + </Visible> |
| 88 | + <Visible large> |
| 89 | + <Heading size={22} weight="bold" color={fullNameColorCode}> |
| 90 | + {fullName} |
| 91 | + </Heading> |
| 92 | + </Visible> |
| 93 | + <Box flexDirection="row" marginTop={16}> |
| 94 | + <Box> |
| 95 | + <Link to={linkedInUrl} isExternal> |
| 96 | + <LinkedInIcon /> |
| 97 | + </Link> |
| 98 | + </Box> |
| 99 | + <Box marginLeft={8}> |
| 100 | + <Link to={twitterUrl} isExternal> |
| 101 | + <TwitterIcon /> |
| 102 | + </Link> |
| 103 | + </Box> |
| 104 | + </Box> |
| 105 | + </Box> |
| 106 | + </Box> |
| 107 | + <Divider color="#e1e1e1" /> |
| 108 | + <Box marginTop={24}> |
| 109 | + <Text size="large">{bio}</Text> |
| 110 | + </Box> |
| 111 | + </Box> |
| 112 | + ); |
| 113 | +}; |
0 commit comments