Skip to main content

useContainerBreakpoint

Retorna o breakpoint atual do Container pai ou de um elemento informado.

Import​

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

Params​

element​

Typestring | React.RefObject | HTMLElement | null

Description​

Elemento a medir (id, ref ou nó DOM). Com null, usa o breakpoint do Container ancestral via contexto.

Returns​

resources​

Typeobject

Description​

Estado do breakpoint.

resources.breakpoint​

Type'sm' | 'md' | 'lg'

Description​

Breakpoint atual.

resources.isSm​

Typeboolean

Description​

Indica se o breakpoint é 'sm'.

resources.isMd​

Typeboolean

Description​

Indica se o breakpoint é 'md'.

resources.isLg​

Typeboolean

Description​

Indica se o breakpoint é 'lg'.

Feedback​

To report a problem, request new icons, request new component use cases, ask questions, share suggestions, or report bugs, get in touch through our Slack channel #tangram-design-system.