@fintory/utils
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

@fintory/utils

Available utilities

dynamicFontSize

Example usage:

import { fontSize } from '@fintory/utils'
// or `import fontSize from '@fintory/utils/es/dynamicFontSize'`

fontSize(16) // returns a css literal that can be used in `styled-components`
fontSize(16, 1.6) // also returns a css literal

Hint: You may only use the fontSize method, if you are also using styled-components. Otherwise, you can just use the generateFontSize function, which is also exported and can be used like this:

import { generateFontSize } from '@fintory/utils'
// or `import { generateFontSize } from '@fintory/utils/es/dynamicFontSize'`

generateFontSize(16) // returns an object which can be used in any CSS-in-JS toolkit
generateFontSize(16, 1.6) // also returns an object

Usage of only some parts of the package

To enable tree-shaking for specific parts of your application, you may need to scope the package a little more like @fintory/utils/es/dynamicFontSize instead of @fintory/utils (with spread).

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.4.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.4.0
    0
  • 0.3.0
    0
  • 0.2.0
    0

Package Sidebar

Install

npm i @fintory/utils

Weekly Downloads

0

Version

0.4.0

License

MIT

Unpacked Size

26.4 kB

Total Files

20

Last publish

Collaborators

  • chmtn
  • iduuck