@react-theming/storybook-addon
Version:
Develop themes and themable components with Emotion, Styled Components, Material-UI and your custom solution
23 lines (18 loc) • 727 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.defaultColorSnippet = exports.defaultSnippet = void 0;
var defaultSnippet = function defaultSnippet(selectedValue) {
var namespace = selectedValue.namespace,
name = selectedValue.name;
var path = namespace.join('.');
var fullPath = "".concat(path, ".").concat(name);
var themeProp = "${({ theme }) => theme.".concat(fullPath, "}");
return themeProp;
};
exports.defaultSnippet = defaultSnippet;
var defaultColorSnippet = function defaultColorSnippet(selectedValue) {
return (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.value) || '';
};
exports.defaultColorSnippet = defaultColorSnippet;