1
0
mirror of https://github.com/nostalgic-css/NES.css.git synced 2025-08-27 07:54:29 +02:00

feat(progress): adding is-rounded to progess has was requested in #242

This commit is contained in:
shotaro kaneda
2019-01-18 00:00:43 -03:00
parent e74d2c0e35
commit d6b75e5305
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>`;
});