ListItemSwitch

Install

yarn add @ntds/list

Import

import { ListItemSwitch } from '@ntds/list';

Props

ListItemSwitch

PropType & Description
label
string

Main label text displayed in the list item

icon
any

Optional icon displayed before the label

checked
boolean

State of the switch (on/off)

setValue
(val: boolean) => void

useState setter function to update the switch state

This guide is based on version: 2.1.7