UNPKG

@brizy/ui

Version:
11 lines (10 loc) 494 B
import React, { useCallback } from "react"; import { getItemProperties } from "./utils"; import { BRZ_PREFIX } from "../constants"; export const Item = (props) => { const { color, children, onClick } = props; const _onClick = useCallback(() => { onClick === null || onClick === void 0 ? void 0 : onClick(); }, [onClick]); return (React.createElement("div", { className: `${BRZ_PREFIX}-dropdown-item`, style: getItemProperties(color), onClick: _onClick }, children)); };