1
0
mirror of https://github.com/nostalgic-css/NES.css.git synced 2025-08-01 04:00:11 +02:00

Merge pull request #254 from juanpablolvl99/develop

adding is-rounded to progess
This commit is contained in:
Igor Guastalla
2019-01-19 14:57:42 -02:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

View File

@@ -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);
@@ -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>`;
});

View File

@@ -27,6 +27,9 @@
@include progress-style($base-color);
&.is-rounded {
@include rounded-corners();
}
&.is-primary {
@include progress-style(map-get($primary-colors, "normal"));
}