stili

v3.1.0
Style normalizer for creating universal React/React Native components.

stili

Style normalizer for creating universal React/React Native components.

Install

$ yarn add stili

Usage

normalizeWebStyle(style: TStyle) => TCssWebProps
normalizeNativeStyle(style: TStyle) => TCssNativeProps
  • TStyle – normalized styles
  • TCssWebProps – web specific styles
  • TCssNativeProps – native specific styles

In web file

import { normalizeWebStyle } from 'stili'

normalizeWebStyle({ lineHeight: 16 })
// field target: { lineHeight: '16px' }

In native file

import { normalizeNativeStyle } from 'stili'

normalizeNativeStyle({ lineHeight: 16 })
// field target: { lineHeight: 16 }
npm i stili

Metadata

  • MIT
  • >=12.13.0
  • Unknown
  • released 5/6/2021

Downloads