sparkast/components/selectorItem.tsx
2024-09-21 21:31:08 +08:00

13 lines
348 B
TypeScript

import { ReactNode } from "react";
import { selectionType } from "./picker";
export type selectedOnChange = (target: selectionType) => void;
export default function SelectionItem(props: {
key: selectionType;
children: ReactNode;
onChange: selectedOnChange;
}) {
return <div onClick={() => props.onChange(props.key)}>{props.children}</div>;
}