@mailstep-design-system/utils
v0.0.3
Published
Useful tools and universal components for versatile use.
Downloads
11
Keywords
Readme
Utils
Useful tools and universal components for versatile use.
CreateRgba
You can use this tool for create a rgba color from hexa color (#FFFFFF) or from default theme named color (like success, danger, red2...)
import { createRgba } from '@mailstep-design-system/utils'
const StyledLink = styled.div<{color: string}>`
color: ${({ color }): string => createRgba(color, 0.7)};
`
KeyPress
import { KeyPress } from '@mailstep-design-system/utils'
<div>
<KeyPress action={() => alert('You click ESC')} keyCode={27} />
Press ESC
</div>