import classNames from 'classnames' import * as React from 'react' import { Image, types, Text, Plain } from 'react-bricks/rsc' import { FaGithub, FaLinkedin, FaTwitter } from 'react-icons/fa' import { textColors } from '../../colors' import { LayoutProps } from '../../LayoutSideProps' import { avatars } from '../../shared/defaultImages' import blockNames from '../../blockNames' export interface TeamItemProps extends LayoutProps { twitter?: string github?: string linkedin?: string picture: types.IImageSource memberName: types.TextValue jobTitle: types.TextValue } const TeamItem: types.Brick = ({ twitter, github, linkedin, picture, memberName, jobTitle, }) => { return (
{ (
{props.children}
)} placeholder="Name..." /> (
{props.children}
)} placeholder="Role..." /> {(twitter || linkedin || github) && (
{twitter && ( )} {linkedin && ( )} {github && ( )}
)}
) } TeamItem.schema = { name: blockNames.TeamItem, label: 'Member', category: 'team', hideFromAddMenu: true, playgroundLinkLabel: 'View source code on Github', playgroundLinkUrl: 'https://github.com/ReactBricks/reactbricks-starters/blob/main/packages/reactbricks-ui/nextjs-app/src/team/Team/TeamItem.tsx', getDefaultProps: () => ({ memberName: 'Matteo Frana', jobTitle: 'Founder and CEO', twitter: 'matfrana', github: '', linkedin: '', picture: avatars.MATTEO_FRANA, }), sideEditProps: [ { groupName: 'Social Links', defaultOpen: true, props: [ { name: 'twitter', label: 'Twitter UserName', type: types.SideEditPropType.Text, }, { name: 'linkedin', label: 'Linkedin UserName', type: types.SideEditPropType.Text, }, { name: 'github', label: 'Github UserName', type: types.SideEditPropType.Text, }, ], }, ], } export default TeamItem