Pular para o conteúdo principal

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​

Para reportar algum problema, solicitar novos ícones, solicitar novos casos de uso de componentes, tirar dúvidas, enviar sugestões ou reportar bugs, entre em contato pelo nosso canal no Slack #tangram-design-system.