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

Merge pull request #233 from LukBukkit/develop

feat(text colors): adds text colors classes like is-primary etc.
This commit is contained in:
Abdullah Samman
2018-12-29 00:51:11 +02:00
committed by GitHub
3 changed files with 37 additions and 0 deletions

19
docs/text.stories.js Normal file
View File

@@ -0,0 +1,19 @@
import { storiesOf } from '@storybook/html'; // eslint-disable-line import/no-extraneous-dependencies
import { // eslint-disable-line import/no-extraneous-dependencies
withKnobs, radios,
} from '@storybook/addon-knobs';
const stories = storiesOf('Text', module);
stories.addDecorator(withKnobs);
stories.add('text', () => {
const extraClass = radios('class', {
default: '',
'is-primary': 'is-primary',
'is-success': 'is-success',
'is-warning': 'is-warning',
'is-error': 'is-error',
'is-disabled': 'is-disabled',
}, '');
return `<span class="nes-text ${extraClass}">NES.css</span>`;
});

View File

@@ -10,3 +10,4 @@
@import "progress.scss";
@import "radios.scss";
@import "tables.scss";
@import "text.scss";

17
scss/elements/text.scss Normal file
View File

@@ -0,0 +1,17 @@
.nes-text {
&.is-primary {
color: map-get($primary-colors, "normal");
}
&.is-success {
color: map-get($success-colors, "normal");
}
&.is-warning {
color: map-get($warning-colors, "normal");
}
&.is-error {
color: map_get($error-colors, "normal");
}
}