Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{
title: 'CSS Themes',
params: [
{
name: 'Forest',
props: {
style: { color: 'teal', background: '#00b894', height: '100vh', padding: '10px' },
},
},
],
},
];
export default {
title: 'Addon/Contexts',
decorators: [withContexts(topLevelContexts)],
};
export const simpleCssTheming = () => ({
template: "<span>I'm a children of the injected 'div' (where provides a theming context).</span>",
});
simpleCssTheming.story = {
name: 'Simple CSS Theming',
parameters: {
contexts: storyLevelContexts,
},
};
// Example B: Language (Vue provide/inject API)
const createContext = initialValue => {
const uid = `_${Date.now()}${Math.random()}`;