@1771technologies/lytenyte-pro
Version:
Blazingly fast headless React data grid with 100s of features.
23 lines (22 loc) • 636 B
JavaScript
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 ResetImpl({ as, ...props }, ref) {
const ctx = useFilterSelectRoot();
const slot = useSlot({
props: [
{
onClick: ctx.reset,
},
props,
],
ref: ref,
slot: as ?? _jsx("button", { children: "Reset" }),
state: {
onReset: ctx.reset,
},
});
return slot;
}
export const Reset = forwardRef(ResetImpl);