SubComponents

Item

This component extends the native <div>arrow-up-right API. This is the parent component of the Description/NestedContent subcomponents.

Item API

Props
Type
Required

children

ReactNode

βœ…

hasError

boolean

❌

isDisabled

boolean

❌

value

string

❌

image

string

❌

imageLayout

'left' | 'top'

❌

controlType

'checkbox' | 'radio'

❌

hideControl

boolean

❌

onCheck

(e: ChangeEvent) => void

❌

chevron-rightchildrenhashtag

The Description/NestedContent subcomponents.

chevron-righthasErrorhashtag

Control the error state for each item.

chevron-rightisDisabledhashtag

Control the disabled state for each item.

chevron-rightvaluehashtag

To pass a controlled value.

chevron-righticonhashtag

To pass a custom icon.

chevron-rightimagehashtag

String passed to render an image.

chevron-rightimageLayouthashtag

The image presentation mode.

chevron-rightcontrolTypehashtag

To choose the control each item has.

chevron-righthideControlhashtag

To show/hide the control.

chevron-rightonCheckhashtag

Executed when checked.

Description

The description subcomponent controls the structure rendered inside. This component extends the native <div>arrow-up-right API.

Description API

Props
Type
Required

children

ReactNode

βœ…

chevron-rightchildrenhashtag

An string/structure to describe the item.

NestedContent

The subcomponent can be used to render actions or extra actions below the content.

NestedContent API

The content subcomponent controls the structure rendered below, when checked, almost like an accordion.

Props
Type
Required

children

ReactNode

βœ…

chevron-rightchildrenhashtag

An string/structure rendered when the item is checked/active.

HelpText

The HelpText subcomponent extends the SDS HelpText component. See for reference: HelpText

Label

The Label subcomponent extends the SDS label component. See for reference: Label

Last updated