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'