How to use taro-css-to-react-native - 1 common examples

To help you get started, we’ve selected a few taro-css-to-react-native examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NervJS / taro / packages / taro-cli / src / rn / styleProcess.ts View on Github external
function getStyleObject ({css, filePath}) {
  let styleObject = {}
  try {
    styleObject = transformCSS(css)
  } catch (err) {
    Util.printLog(processTypeEnum.WARNING, 'css-to-react-native 报错', filePath)
    console.log(chalk.red(err.stack))
  }
  return styleObject
}

taro-css-to-react-native

Convert CSS text to a React Native stylesheet object

MIT
Latest version published 11 days ago

Package Health Score

90 / 100
Full package analysis

Popular taro-css-to-react-native functions