UNPKG

@1771technologies/lytenyte-pro

Version:

Blazingly fast headless React data grid with 100s of features.

23 lines (22 loc) 636 B
import { jsx as _jsx } from "react/jsx-runtime"; import { useSlot } from "@1771technologies/lytenyte-core/yinternal"; import { forwardRef } from "react"; import { useFilterSelectRoot } from "./context.js"; function ApplyImpl({ as, ...props }, ref) { const ctx = useFilterSelectRoot(); const slot = useSlot({ props: [ { onClick: ctx.apply, }, props, ], ref: ref, slot: as ?? _jsx("button", { children: "Apply" }), state: { onReset: ctx.apply, }, }); return slot; } export const Apply = forwardRef(ApplyImpl);