Skip to content

Commit

Permalink
chore: a bit tidier
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-chase committed Nov 20, 2020
1 parent 7a3a25a commit ca59b6d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
21 changes: 12 additions & 9 deletions packages/experimental/src/components/TagSet/TagSet.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,21 +132,24 @@ export default {
},
},
decorators: [
(story) => <div className="tag-set-story__viewport">{story()}</div>,
(story) => (
<>
<style>
{`.${blockClass}--show-all-modal { opacity: 0; visibility: hidden; /* prevents glitch storybook modal css load */ }`}
;
</style>
<div className="tag-set-story__viewport">{story()}</div>
</>
),
],
};

const Template = (argsIn) => {
const { children, containerWidth, ...args } = { ...argsIn };
return (
<>
<style>
{`.${blockClass}--show-all-modal { opacity: 0; visibility: hidden; }`};
</style>
<div style={{ width: containerWidth }}>
<TagSet {...args}>{children}</TagSet>
</div>
</>
<div style={{ width: containerWidth }}>
<TagSet {...args}>{children}</TagSet>
</div>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
@import '../../global/styles/carbon-settings'; // goes before index as it affects how carbon is used.
@import './index';

.tag-set-story__viewport {
$block-class: #{$exp-prefix}-tag-set;

.#{$block-class}__viewport {
position: relative;
box-shadow: 0 0 0 $layout-02 $ui-01;
}

.tag-set-story__viewport::before {
.#{$block-class}__viewport::before {
position: absolute;
top: calc(-1 * #{$layout-02});
left: 0;
Expand Down

0 comments on commit ca59b6d

Please sign in to comment.