How to use the fbjs/lib/hyphenateStyleName function in fbjs

To help you get started, we’ve selected a few fbjs 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 rashmiap / personal-website-react / node_modules / styled-components / dist / styled-components-no-parser.browser.esm.js View on Github external
}).map(function (key) {
    if (isPlainObject(obj[key])) return objToCss(obj[key], key);
    return hyphenate(key) + ': ' + obj[key] + ';';
  }).join(' ');
  return prevKey ? prevKey + ' {\n  ' + css + '\n}' : css;
github prometheusresearch-archive / react-stylesheet / src / compiler / index.js View on Github external
export function compileName(name: string): string {
  return hyphenateStyleName(name);
}
github facebook / prepack / src / react / experimental-server-rendering / rendering.js View on Github external
function createMarkupForStyles(realm: Realm, styles: Value): Value {
  let serialized = ([]: Array);
  let delimiter = "";

  if (styles instanceof ObjectValue && !styles.isPartialObject()) {
    for (let [styleName, binding] of styles.properties) {
      if (binding.descriptor !== undefined) {
        let isCustomProperty = styleName.indexOf("--") === 0;
        let styleValue = getProperty(realm, styles, styleName);

        if (styleValue !== realm.intrinsics.null && styleValue !== realm.intrinsics.undefined) {
          serialized.push(delimiter + hyphenateStyleName(styleName) + ":");
          serialized.push(dangerousStyleValue(realm, styleName, styleValue, isCustomProperty));
          delimiter = ";";
        }
      }
    }
  }
  if (serialized.length > 0) {
    return renderReactNode(realm, serialized);
  }
  return realm.intrinsics.null;
}
github Ephem / react-aldrin / src / renderer / reactUtils / createMarkupForStyles.js View on Github external
const processStyleName = memoizeStringOnly(function(styleName) {
    return hyphenateStyleName(styleName);
});
github styled-components / vue-styled-components / src / utils / flatten.js View on Github external
const css = Object.keys(obj).map(key => {
    if (isPlainObject(obj[key])) return objToCss(obj[key], key)
    return `${hyphenate(key)}: ${obj[key]};`
  }).join(' ')
  return prevKey ? `${prevKey} {
github rashmiap / personal-website-react / node_modules / styled-components / dist / styled-components.esm.js View on Github external
}).map(function (key) {
    if (isPlainObject(obj[key])) return objToCss(obj[key], key);
    return hyphenate(key) + ': ' + obj[key] + ';';
  }).join(' ');
  return prevKey ? prevKey + ' {\n  ' + css + '\n}' : css;
github rashmiap / personal-website-react / node_modules / styled-components / dist / styled-components-no-parser.esm.js View on Github external
}).map(function (key) {
    if (isPlainObject(obj[key])) return objToCss(obj[key], key);
    return hyphenate(key) + ': ' + obj[key] + ';';
  }).join(' ');
  return prevKey ? prevKey + ' {\n  ' + css + '\n}' : css;