Skip to content

Commit

Permalink
feat(badges): storybook corrections and order of properties
Browse files Browse the repository at this point in the history
  • Loading branch information
guastallaigor committed Dec 19, 2018
1 parent c4075b0 commit b6d1044
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 6 additions & 3 deletions docs/badge.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,29 @@ stories.addDecorator(withKnobs);

stories.add('badges', () => {
const optionsLeft = radios('class-left', {
default: 'is-dark',
'is-dark': 'is-dark',
'is-success': 'is-success',
'is-primary': 'is-primary',
'is-warning': 'is-warning',
'is-error': 'is-error',
}, '');
}, 'is-dark');

const optionsRight = radios('class-right', {
default: 'is-success',
'is-dark': 'is-dark',
'is-success': 'is-success',
'is-primary': 'is-primary',
'is-warning': 'is-warning',
'is-error': 'is-error',
}, '');
}, 'is-success');

const sizes = radios('size', {
default: 'is-medium',
'is-small': 'is-small',
'is-medium': 'is-medium',
'is-large': 'is-large',
}, '');
}, 'is-medium');

return `<span class="nes-badge ${sizes}">
<span class="${optionsLeft}">npm</span>
Expand Down
6 changes: 3 additions & 3 deletions scss/elements/badges.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@mixin span-style($color, $background, $left) {
position: absolute;
color: $color;
background-color: $background;
top: 0;
width: 50%;
color: $color;
background-color: $background;

@if $left == 0 {
left: 0;
Expand Down Expand Up @@ -46,6 +46,7 @@
$border-size: 4px;

position: relative;
box-sizing: border-box;
display: inline-flex;
align-items: center;
justify-content: center;
Expand All @@ -55,7 +56,6 @@
white-space: nowrap;
vertical-align: middle;
cursor: $cursor-click-url;
box-sizing: border-box;
user-select: none;
border: none;

Expand Down

0 comments on commit b6d1044

Please sign in to comment.