Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should error on invalid usage (global)', () => {
// $ExpectError
addParameters();
// $ExpectError
addParameters('');
});
});
it('should error on invalid usage (global)', () => {
// $ExpectError
addParameters();
// $ExpectError
addParameters('');
});
});
it('should validate on default usage (global)', () => {
addParameters(parameters);
});
it('should validate on default usage (global)', () => {
addParameters(parameters);
});
import { storiesOf, addDecorator, addParameters } from '@storybook/react';
import addons, { makeDecorator } from '@storybook/addons';
import { withAdk, adkParams } from '../dev/withAdk';
/**
* todo:
* 1. Add themes via one global method from `config.js` with global decorator inside
* 2. Set additional theme via addParameters (global/local)
* 3. Select current theme via parameters (to override)
* 4. Keep current theme in url
*
*/
addParameters(adkParams({ themes: ['theme1', 'theme2'], currentTheme: 0 }));
storiesOf('Storybook Addon Development Kit', module)
.addDecorator(withAdk({ mainColor: 'green' }))
.add(
'Stories',
() => {
console.log('Render Button 1');
return (
<div>
<button>Button 1</button>
</div>
);
},
adkParams({ currentTheme: 1 })
)
.add(