MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / CommunityButton

Function CommunityButton

apps/web/ui/CommunityButton/index.tsx:16–40  ·  view source on GitHub ↗
({
  onClick,
  communityType,
  iconSize = '25',
  label = 'Connect to',
  fontSize = 'text-base',
}: CommunityButtonProps)

Source from the content-addressed store, hash-verified

14}
15
16export 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}

Callers

nothing calls this directly

Calls 2

capitalizeFunction · 0.90
onClickFunction · 0.50

Tested by

no test coverage detected