({
onClick,
communityType,
iconSize = '25',
label = 'Connect to',
fontSize = 'text-base',
}: CommunityButtonProps)
| 14 | } |
| 15 | |
| 16 | export default function CommunityButton({ |
| 17 | onClick, |
| 18 | communityType, |
| 19 | iconSize = '25', |
| 20 | label = 'Connect to', |
| 21 | fontSize = 'text-base', |
| 22 | }: CommunityButtonProps) { |
| 23 | const Icon = communityType === 'discord' ? DiscordIcon : SlackIcon; |
| 24 | |
| 25 | return ( |
| 26 | <button |
| 27 | aria-label={`${label} ${capitalize(communityType)}`} |
| 28 | className={classNames(styles.btn, fontSize)} |
| 29 | type="button" |
| 30 | onClick={() => onClick(communityType)} |
| 31 | > |
| 32 | <div className={styles.btnContent}> |
| 33 | <Icon size={iconSize} /> |
| 34 | <p className={styles.whitespaceNowrap}> |
| 35 | {label} <b>{capitalize(communityType)}</b> |
| 36 | </p> |
| 37 | </div> |
| 38 | </button> |
| 39 | ); |
| 40 | } |
nothing calls this directly
no test coverage detected