Skip to content

Commit

Permalink
feat(progress): adding is-rounded to progess has was requested in #242
Browse files Browse the repository at this point in the history
  • Loading branch information
youngkaneda committed Jan 18, 2019
1 parent e74d2c0 commit d6b75e5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/progress.stories.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { storiesOf } from '@storybook/html'; // eslint-disable-line import/no-extraneous-dependencies
import { // eslint-disable-line import/no-extraneous-dependencies
withKnobs, number, radios,
withKnobs, number, radios, boolean,
} from '@storybook/addon-knobs';

const stories = storiesOf('Progress', module);
Expand All @@ -22,5 +22,7 @@ stories.add('progress', () => {
'is-error': 'is-error',
'is-pattern': 'is-pattern',
}, '');
return `<progress class="nes-progress ${extraClass}" value="${percentage}" max="100" style="width: 98%;"></progress>`;
const isRounded = boolean('is-rounded', false) ? 'is-rounded' : '';
const selectedClasses = [extraClass, isRounded];
return `<progress class="nes-progress ${selectedClasses.join(' ')}" value="${percentage}" max="100" style="width: 98%;"></progress>`;
});
3 changes: 3 additions & 0 deletions scss/elements/progress.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@

@include progress-style($base-color);

&.is-rounded {
@include rounded-corners();
}
&.is-primary {
@include progress-style(map-get($primary-colors, "normal"));
}
Expand Down

0 comments on commit d6b75e5

Please sign in to comment.