UNPKG

@uva-glass/component-library

Version:

React components UvA

37 lines (36 loc) 1.52 kB
import { ReactNode } from 'react'; type CheckboxProps = { label: string | ReactNode; value: string; prefix?: string; tooltip?: ReactNode; tooltipPosition?: 'left' | 'center' | 'right'; disabled?: boolean; }; export interface CheckboxButtonBarProps { /** array with objects with label, value, prefix and disabled*/ checkboxes: CheckboxProps[]; defaultValues?: string[]; label?: string; /** 'top' | 'left' */ labelPosition?: 'top' | 'left'; /** `true` to show an asterisk to indicate an item is required; otherwise, `false`. */ required?: boolean; /** `true` to color border red to show not valid; otherwise, `false`. */ notValid?: boolean; /** error text to display under the bar */ notValidatedText?: string; /** returns an array with only one value */ actAsRadioButtonBar?: boolean; /** optional footer text */ footerText?: string; /** disables all checkboxes in the bar */ disableGroup?: boolean; /** `true` to sepearte each button in their own bordered container */ segmented?: boolean; /** `true` sets forceSquared on all buttons */ forceSquared?: boolean; onSetValues: (value: string[]) => void; } export declare const CheckboxButtonBar: ({ checkboxes, defaultValues, label, labelPosition, required, notValid, notValidatedText, actAsRadioButtonBar, footerText, disableGroup, segmented, forceSquared, onSetValues, }: CheckboxButtonBarProps) => import("react/jsx-runtime").JSX.Element; export {};