Accordion
Importβ
import { Accordion } from '@resultadosdigitais/tangram-components'
Propertiesβ
children
β
title
β
Type | string | func | node |
---|
Descriptionβ
Sets the title for the Accordion
.
// Can be a string:
title="Title of my accordion"
// Can be a function:
title={() => <Text as="h3" token={Text.tokens.TEXT_MD_BOLD}>Title of my accordion</Text>}
// Or a node:
title={
<>
Title of my accordion
<Tag kind={Tag.kinds.primary}>My label</Tag>
</>
}
open
β
maxHeight
β
Type | number | string |
---|
Descriptionβ
Sets the max height of the container. If a number, the value will be automatically transformed into pixels. Unlimit if not set.
onChange
β
Type | func |
---|---|
Param | event React.SyntheticEvent - The event source of the callback. |
Param | newStateOrIndex boolean|number - When Accordion is trigged inside of the Accordion.Group |
Descriptionβ
Callback fired when the Accordion
changes.
it is the current index of the Accordion
. Otherwise, it is a boolean about the open state.
<AccordionGroup />β
Importβ
import { AccordionGroup } from '@resultadosdigitais/tangram-components'
Propertiesβ
children
β
<AccordionTitle />β
Importβ
import { AccordionTitle } from '@resultadosdigitais/tangram-components'