Pular para o conteúdo principal

Modal

import { Modal } from '@resultadosdigitais/tangram-components'
Typestring

Description

Gives the modal an accessible name by referring to the element that provides the modal title.

Typestring

Description

Gives the modal an accessible description by referring to the modal content that describes the primary message or purpose.

Typenode
Defaultnull

Description

Sets the children.

TypeelementType
Defaultstyled(Card)` &, & > ${Form.Style} { max-height: calc(100vh - ${MODAL_MARGIN}); padding: 0; border: none; display: flex; flex-flow: column; } `

Description

Sets the custom Card component.

Typebool
Defaultfalse

Description

Sets if close pressing ESC key is disabled.

Typebool
Defaultfalse

Description

Sets if close in outside click is disabled.

Typebool
Defaultfalse

Description

Sets if the overlay is hidden (not rendered).

Typefunc
Paramevent React.SyntheticEvent - The event source of the callback.

Description

Callback fired when the Modal is closed.

Typefunc
Paramevent React.SyntheticEvent - The event source of the callback.

Description

Callback fired when the ESC key is pressed.

Typefunc
Paramevent React.SyntheticEvent - The event source of the callback.

Description

Callback fired when a click outside is triggered.

Typebool
Defaultfalse

Description

Sets if is open.

Typebool
Defaultfalse

Description

Doesn't keep the Modal mounted (present in the DOM) when it's closed.

<ModalActions />

Import

import { ModalActions } from '@resultadosdigitais/tangram-components'

Properties

children 📍

Concerns
📍 Required
Typenode
Description

Sets the children. Should be one of <Button /> OR one <ButtonGroup />.

<ModalBanner />

Import

import { ModalBanner } from '@resultadosdigitais/tangram-components'

Properties

children 📍

Concerns
📍 Required
Typenode
Description

Sets the children. Should be an image, either svg or img tag.

caption 📍

Concerns
📍 Required
Typestring
Description

Sets the image caption.

<ModalHeader />

Import

import { ModalHeader } from '@resultadosdigitais/tangram-components'

Properties

children

Typenode
Defaultnull
Description

Sets the children.

<ModalSteps />

Import

import { ModalSteps } from '@resultadosdigitais/tangram-components'

Properties

startsAt

Typenumber
Default0
Description

Sets the first index to be rendered.

render 📍

Concerns
📍 Required
Typefunc
Paramprops Object - The props that will be passed to the inner component.
  • props.current number - The current step index.
  • props.total number - The total of steps.
  • props.next Function - Function that triggers the render of the next step.
  • props.prev Function - Function that triggers the render of the previous step.
Description

Function responsible for rendering the multiple Modal steps.

total 📍

Concerns
📍 Required
Typenumber
Description

Sets the total of steps.

Feedback