How to use styletron-standard - 1 common examples

To help you get started, we’ve selected a few styletron-standard 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 styletron / styletron / packages / styletron-react / src / index.js View on Github external
function css(style: StyleObject) {
      const className = driver(style, styletronEngine);
      if (!(__BROWSER__ && __DEV__)) {
        return className;
      }
      const {stack, message} = new Error("stacktrace source");

      const nextDeps = [debugEngine, hydrating];
      if (
        prevDebugClassNameDeps.current[0] !== nextDeps[0] ||
        prevDebugClassNameDeps.current[1] !== nextDeps[1]
      ) {
        if (debugEngine && !hydrating) {
          debugClassName.current = debugEngine.debug({
            stackInfo: {stack, message},
            stackIndex: 1,
          });
        }

styletron-standard

Standard interfaces for Styletron

MIT
Latest version published 2 years ago

Package Health Score

58 / 100
Full package analysis

Popular styletron-standard functions

Similar packages