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

Function Badge

packages/ui-components/src/Common/Badge/index.tsx:15–37  ·  view source on GitHub ↗
({
  kind = 'default',
  size = 'medium',
  className,
  children,
  ...props
})

Source from the content-addressed store, hash-verified

13};
14
15const Badge: FC<PropsWithChildren<BadgeProps>> = ({
16 kind = 'default',
17 size = 'medium',
18 className,
19 children,
20 ...props
21}) => (
22 <span
23 className={classNames(
24 styles.badge,
25 styles[kind],
26 styles[size],
27 {
28 [styles.circular]:
29 typeof children === 'string' && children.length === 1,
30 },
31 className
32 )}
33 {...props}
34 >
35 {children}
36 </span>
37);
38
39export default Badge;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected