Skip to content

Commit

Permalink
MNT Support Storybook v7
Browse files Browse the repository at this point in the history
  • Loading branch information
Sabina Talipova committed May 30, 2023
1 parent 2906a86 commit d61d5a6
Show file tree
Hide file tree
Showing 5 changed files with 1,451 additions and 1,447 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/src/components/TagField.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
}

.ss-tag-field__option-count-icon {
padding: 0 ($spacer / 2);
padding: 0 calc($spacer / 2);
line-height: 0.8;
}

Expand Down
31 changes: 18 additions & 13 deletions client/src/components/tests/TagField-story.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import React from 'react';
import { storiesOf } from '@storybook/react';
import { Component as TagField } from '../TagField';
import TagField from 'components/TagField';

storiesOf('TagField/TagField', module)
.addDecorator(storyFn => (
<div style={{ width: '250px' }} className="ss-tag-field">
{storyFn()}
</div>
))
.add('Simple Example', () => (
export default {
title: 'TagField/TagField',

decorators: [
(storyFn) => (
<div style={{ width: '250px' }} className="ss-tag-field">
{storyFn()}
</div>
),
],
};

export const SimpleExample = () => (
<TagField
name="test"
options={[
Expand All @@ -19,8 +24,9 @@ storiesOf('TagField/TagField', module)
{ Title: 'Five', Value: 5 },
]}
/>
))
.add('Multiple Selection', () => (
);

export const MultipleSelection = () => (
<TagField
name="test"
multi
Expand All @@ -32,5 +38,4 @@ storiesOf('TagField/TagField', module)
{ Title: 'Five', Value: 5 },
]}
/>
))
;
);
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-select": "^5.7.3",
"url": "^0.11.0"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit d61d5a6

Please # to comment.