Documentation
Interface: ModalProps
Description: This interface defines the props for a modal component.
Example:
<Modal
className="my-modal"
wide
show={true}
onClose={() => console.log("Modal closed")}
>
{/* Modal content */}
</Modal>
Properties
Property: className
Description: Optional string to apply a custom CSS class name to the modal.
Type:
string
Default:
undefined
Property: children
Description: Optional ReactNode representing the content of the modal.
Type:
ReactNode
Default:
undefined
Property: wide
Description: Optional boolean indicating whether the modal should occupy the full width of the screen.
Type:
boolean
Default:
undefined
Property: show
Description: Required boolean indicating whether the modal is visible.
Type:
boolean
Default:
undefined
Property: closeHidden
Description: Optional boolean indicating whether the modal should close when the user clicks outside of it.
Type:
boolean
Default:
undefined
Property: onClose
Description: Required function to be called when the modal is closed.
Type:
() => void
Default:
undefined
Interface: PickerProps
Description:
This interface defines the props for a picker component. The T
type parameter represents the type of the data items in the picker.
Example:
interface Item {
id: number;
name: string;
}
<Picker<Item>
data={[
{ id: 1, name: "Item 1" },
{ id: 2, name: "Item 2" },
]}
selected={null}
onChange={(e) => console.log(e.value)}
/>
Properties
Property: className
Description: Optional string to apply a custom CSS class name to the picker.
Type:
string
Default:
undefined
Property: panelClassName
Description: Optional string to apply a custom CSS class name to the picker panel.
Type:
string
Default:
undefined
Property: data
Description: Required array of data items to be displayed in the picker.
Type:
T[]
Default:
undefined
Property: label
Description: Optional string to display as a label for the picker.
Type:
string
Default:
undefined
Property: selected
Description: Required data item currently selected in the picker.
Type:
T | null
Default:
undefined
Property: onChange
Description: Required function to be called when the user selects a new item in the picker.
Type:
(e: DropdownChangeEvent) => void
Parameters:
e
(DropdownChangeEvent
): Event object containing information about the selected item.
Default:
undefined
Property: placeholder
Description: Optional string to display as a placeholder when no item is selected.
Type:
string
Default:
undefined
Property: emptyFilterMessage
Description: Optional string to display when no items match the search filter.
Type:
string
Default:
undefined
Property: isSearchable
Description: Optional boolean indicating whether the picker is searchable.
Type:
boolean
Default:
undefined