branch feature/storybook updated (c5b00278 -> 4415a166)
This is an automated email from the git hooks/post-receive script. New change to branch feature/storybook in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git from c5b00278 Init storybook new 4415a166 Add Knobs The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 4415a166b844673df2e4da4d928510dee8c5eb76 Author: jcouteau <couteau@codelutin.com> Date: Mon Dec 2 09:40:28 2019 +0100 Add Knobs Summary of changes: pollen-ui-riot-js/.storybook/addons.js | 3 ++- pollen-ui-riot-js/.storybook/config.js | 5 +++-- pollen-ui-riot-js/package.json | 2 ++ pollen-ui-riot-js/stories/LetterAvatar.stories.js | 2 +- .../stories/LetterAvatarWithKnobs.stories.js | 23 ++++++++++++++++++++++ 5 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 pollen-ui-riot-js/stories/LetterAvatarWithKnobs.stories.js -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/storybook in repository pollen. See https://gitlab.nuiton.org/chorem/pollen.git commit 4415a166b844673df2e4da4d928510dee8c5eb76 Author: jcouteau <couteau@codelutin.com> Date: Mon Dec 2 09:40:28 2019 +0100 Add Knobs --- pollen-ui-riot-js/.storybook/addons.js | 3 ++- pollen-ui-riot-js/.storybook/config.js | 5 +++-- pollen-ui-riot-js/package.json | 2 ++ pollen-ui-riot-js/stories/LetterAvatar.stories.js | 2 +- .../stories/LetterAvatarWithKnobs.stories.js | 23 ++++++++++++++++++++++ 5 files changed, 31 insertions(+), 4 deletions(-) diff --git a/pollen-ui-riot-js/.storybook/addons.js b/pollen-ui-riot-js/.storybook/addons.js index c8cd01bb..108901d3 100644 --- a/pollen-ui-riot-js/.storybook/addons.js +++ b/pollen-ui-riot-js/.storybook/addons.js @@ -1,3 +1,4 @@ import '@storybook/addon-actions/register'; import '@storybook/addon-links/register'; -import '@storybook/addon-a11y/register'; \ No newline at end of file +import '@storybook/addon-a11y/register'; +import '@storybook/addon-knobs/register'; \ No newline at end of file diff --git a/pollen-ui-riot-js/.storybook/config.js b/pollen-ui-riot-js/.storybook/config.js index 427ef94d..cdd84f3d 100644 --- a/pollen-ui-riot-js/.storybook/config.js +++ b/pollen-ui-riot-js/.storybook/config.js @@ -1,6 +1,7 @@ import { configure, addDecorator } from '@storybook/riot'; import { withA11y } from '@storybook/addon-a11y'; - +import { withKnobs } from '@storybook/addon-knobs'; // automatically import all files ending in *.stories.js configure(require.context('../stories', true, /\.stories\.js$/), module); -addDecorator(withA11y); \ No newline at end of file +addDecorator(withA11y); +addDecorator(withKnobs); \ No newline at end of file diff --git a/pollen-ui-riot-js/package.json b/pollen-ui-riot-js/package.json index f36e172f..ad435782 100644 --- a/pollen-ui-riot-js/package.json +++ b/pollen-ui-riot-js/package.json @@ -35,6 +35,8 @@ "@babel/preset-env": "^7.6.3", "@storybook/addon-actions": "^5.2.6", "@storybook/addon-links": "^5.2.6", + "@storybook/addon-a11y": "^5.2.6", + "@storybook/addon-knobs": "^5.2.6", "@storybook/addons": "^5.2.6", "@storybook/riot": "^5.2.6", "babel-loader": "^8.0.6", diff --git a/pollen-ui-riot-js/stories/LetterAvatar.stories.js b/pollen-ui-riot-js/stories/LetterAvatar.stories.js index 62659ed8..5bf935ea 100644 --- a/pollen-ui-riot-js/stories/LetterAvatar.stories.js +++ b/pollen-ui-riot-js/stories/LetterAvatar.stories.js @@ -4,7 +4,7 @@ import '../src/main/web/tag/components/LetterAvatar.tag.html'; export default { title: 'Letter Avatar' }; -export const anonymous = () => mount('letteravatar',{}); +export const anonymous = () => ({tagName : 'letteravatar'}); export const anonymousRounded = () => mount('letteravatar',{rounded:true}); diff --git a/pollen-ui-riot-js/stories/LetterAvatarWithKnobs.stories.js b/pollen-ui-riot-js/stories/LetterAvatarWithKnobs.stories.js new file mode 100644 index 00000000..8c54b907 --- /dev/null +++ b/pollen-ui-riot-js/stories/LetterAvatarWithKnobs.stories.js @@ -0,0 +1,23 @@ +import { tag, mount, storiesOf, asCompiledCode, addDecorator} from '@storybook/riot'; + +import { + withKnobs, + text, + number, + boolean, + array, + select, + color, + date, + button, +} from '@storybook/addon-knobs'; + +import '../src/main/web/tag/components/LetterAvatar.tag.html'; + +storiesOf('Letter Avatar With Knobs') + .addDecorator(withKnobs) + .add('Letter Avatar', () => { + const name = text('Name', 'John Doe'); + const rounded = boolean('Rounded', true); + return {tagName:'letteravatar', opts:{name, rounded}}; + });; \ No newline at end of file -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm