MCPcopy Create free account
hub / github.com/Milkdown/website / SystemButtonItem

Function SystemButtonItem

src/components/header/shared/SystemButtonGroup.tsx:8–27  ·  view source on GitHub ↗
({
  children,
  onClick,
})

Source from the content-addressed store, hash-verified

6import { useDocSearch, useSetDarkMode } from '@/providers'
7
8const SystemButtonItem: FC<{ children: ReactNode; onClick?: () => void }> = ({
9 children,
10 onClick,
11}) => {
12 return (
13 <div
14 onClick={onClick}
15 className={clsx(
16 'flex h-8 w-8 items-center justify-center',
17 'fill-nord-neutral cursor-pointer rounded-sm',
18 'text-nord-neutral dark:text-nord-neutral-dark',
19 'fill-nord-neutral dark:fill-nord-neutral-dark',
20 'hover:bg-nord-outline/80 dark:hover:bg-nord-outline-dark/80',
21 'hover:bg-nord-secondary-deep/[0.12] active:bg-nord-secondary-deep/20 dark:hover:bg-nord-secondary-deep/[0.12] dark:active:bg-nord-secondary-deep/20 transition'
22 )}
23 >
24 {children}
25 </div>
26 )
27}
28
29export const SystemButtonGroup = () => {
30 const setDarkMode = useSetDarkMode()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected