@flanksource/clicky-ui
Version:
Flanksource Clicky UI — React component library built on shadcn/ui with light/dark and density theming.
29 lines • 1.3 kB
TypeScript
import { ReactNode } from 'react';
export type FilterMode = "active" | "neutral" | "include" | "exclude";
export type FilterPillProps = {
mode?: FilterMode;
label: ReactNode;
count?: number;
icon?: string;
badge?: string;
/**
* Tri-state handler. When provided the pill renders as a toggle with a left
* minus (exclude) and right plus (include) region. Clicking a side toggles
* that state against "neutral"; clicking the label cycles neutral → include
* → exclude → neutral.
*/
onModeChange?: (next: FilterMode) => void;
/** Legacy single-click handler, used when onModeChange is not provided. */
onClick?: () => void;
title?: string;
togglePosition?: "left" | "right";
className?: string;
};
export declare function FilterPill({ mode, label, count, icon, badge, onModeChange, onClick, title, togglePosition, className, }: FilterPillProps): import("react/jsx-runtime").JSX.Element;
export type FilterPillGroupProps = {
children: ReactNode;
className?: string;
};
export declare function FilterPillGroup({ children, className }: FilterPillGroupProps): import("react/jsx-runtime").JSX.Element;
export declare function FilterSeparator(): import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=FilterPill.d.ts.map