Skip to main content

useStickyBar

A hook that returns color tokens with appropriate contrast for text and icon based on the background color of the parent StickyBar.

Import

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

Returns

resources

TypeObject

Description

An object with the color tokens for text and icon.

resources.backgroundColor

Typestring

Description

The background color of the parent StickyBar, if it exists.

resources.textColorToken

Typestring

Description

Color token for text.

resources.iconColorToken

Typestring

Description

Color token for icon.

Feedback