Type alias ChecklistProps

ChecklistProps: {
    className?: string;
    createLabel?: ((item) => string);
    handleSelectListItem: ((item, selected) => void);
    id?: string;
    legend?: string;
    listItems: string[];
    selectedListItems: string[];
}

Type declaration

  • Optional className?: string

    Optional string representing CSS class name(s) for styling

  • Optional createLabel?: ((item) => string)

    Optional function that takes a string param and returns a string representing the label text for the checkbox associated with that item

      • (item): string
      • Parameters

        • item: string

        Returns string

  • handleSelectListItem: ((item, selected) => void)

    Function that takes a string param and is called when a checkbox item is selected or deselected

      • (item, selected): void
      • Parameters

        • item: string
        • selected: boolean

        Returns void

  • Optional id?: string

    Optional string representing the id attribute of the fieldset element

  • Optional legend?: string

    Optional string representing legend for fieldset element

  • listItems: string[]

    Array of strings representing the legend text for the fieldset element

  • selectedListItems: string[]

    Array of strings representing items to be displayed as checkboxes in the checklist