0.7.4 • Published 4 years ago

@bdt-component-library/typography v0.7.4

Weekly downloads
183
License
MIT
Repository
github
Last release
4 years ago

Typography Component

About

This is a component published as its own package from our component library monorepo: https://github.com/BenefitsDataTrust/ui-components. Setup instructions, as well as higher-level goals and concerns can be found from the main project README.

Description

Handles display of text according to typography style guide conventions.

API

proptyperequireddefaultexplanation
displayenum("normal", "light", "white")no"normal"Changes the foreground/background color mode
childrenReact nodeyesn/aThe text to display
classNamestringnon/aAdds an optional classname to the component
classOverrides{ normal: string, light: string, white: string }no{}Allows specifying classes to override other specific classes in the component
idstringnon/aAdds an optional id to the component
variantenum("h1", "h2", "h3", "h4", "h5", "h6", "p")no"p""error""success"Changes the primary text style
componentenum("h1", "h2", "h3", "h4", "h5", "h6", "p", "span")novariant propSets the native element used in the markup
noBottomMarginbooleannofalseAdds optional bottom margin
bodyenum("default", "small", "smallCaps")no"default"Changes text secondary styles