MCPcopy Create free account
hub / github.com/nodejs/nodejs.org / BadgeGroup

Function BadgeGroup

packages/ui-components/src/Common/BadgeGroup/index.tsx:17–36  ·  view source on GitHub ↗
({
  kind = 'default',
  size = 'medium',
  badgeText,
  children,
  as: Component = 'a',
  ...args
})

Source from the content-addressed store, hash-verified

15} & ComponentProps<LinkLike>;
16
17const BadgeGroup: FC<PropsWithChildren<BadgeGroupProps>> = ({
18 kind = 'default',
19 size = 'medium',
20 badgeText,
21 children,
22 as: Component = 'a',
23 ...args
24}) => (
25 <Component className={`${styles.wrapper} ${styles[kind]}`} {...args}>
26 {badgeText && (
27 <Badge kind={kind} size={size} className={styles.badge}>
28 {badgeText}
29 </Badge>
30 )}
31
32 <span className={styles.message}>{children}</span>
33
34 {args.target === '_blank' && <ArrowUpRightIcon className={styles.icon} />}
35 </Component>
36);
37
38export default BadgeGroup;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected