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

Function Icon

apps/web/ui/Icon/index.tsx:13–37  ·  view source on GitHub ↗
({
  className,
  children,
  active,
  disabled,
  onClick,
}: Props)

Source from the content-addressed store, hash-verified

11}
12
13export default function Icon({
14 className,
15 children,
16 active,
17 disabled,
18 onClick,
19}: Props) {
20 return (
21 <div
22 className={classNames(className, styles.icon, {
23 [styles.active]: active,
24 [styles.disabled]: disabled,
25 })}
26 onClick={onClick}
27 tabIndex={0}
28 onKeyUp={(event) => {
29 if (!disabled && event.key === 'Enter') {
30 onClick?.();
31 }
32 }}
33 >
34 {children}
35 </div>
36 );
37}

Callers

nothing calls this directly

Calls 1

onClickFunction · 0.50

Tested by

no test coverage detected