How to use the css-to-react-native.default function in css-to-react-native

To help you get started, we’ve selected a few 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 jacobp100 / cssta / runtime / cssUtil.js View on Github external
module.exports.transformStyleTuples = (
  styleTuples /*: StyleTuples */,
  appliedVariables /*: ?Variables */
) /*: Object */ => {
  const transformedStyleTuples = styleTuples.map(([property, value]) => {
    let transformedValue = value;
    if (appliedVariables != null) {
      transformedValue = transformVariables(transformedValue, appliedVariables);
    }
    transformedValue = transformColors(transformedValue);
    return [property, transformedValue];
  });
  return cssToReactNative(transformedStyleTuples);
};
github jacobp100 / cssta / packages / cssta / src / native / dynamicComponentEnhancers / util.js View on Github external
const styles = untransformedRules.map((rule) => {
    const styleTuples = rule.styleTuples.map(([property, value]) => {
      let transformedValue = value;
      transformedValue = transformVariables(transformedValue, appliedVariables);
      transformedValue = transformColors(transformedValue);
      return [property, transformedValue];
    });
    return cssToReactNative(styleTuples);
  });

css-to-react-native

Convert CSS text to a React Native stylesheet object

MIT
Latest version published 2 years ago

Package Health Score

82 / 100
Full package analysis