Skip to content

Commit

Permalink
feat(core-components-amount): add click theme
Browse files Browse the repository at this point in the history
  • Loading branch information
stepancar committed Jun 26, 2020
1 parent 34cdf3c commit b4b0699
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/amount/src/component.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { Amount } from '@alfalab/core-components-amount';

<Story name='Песочница'>
{React.createElement(() => {
const value = number('value', 100);
const value = number('value', 12300);
const currency = select('currency', Object.keys(CURRENCY_CODES), 'RUR');
const minority = number('minority', 100);
const view = select('view', ['default', 'withZeroMinorPart'], 'default');
Expand Down
9 changes: 7 additions & 2 deletions packages/amount/src/index.module.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
@import '../../themes/src/default.css';

:root {
--amount-major-part-font-weight: bold;
--amount-minor-part-font-weight: normal;
}

.component {
white-space: nowrap;
font-weight: bold;
font-weight: var(--amount-major-part-font-weight);
}

.minorPartAndCurrency {
opacity: 0.6;
font-weight: normal;
font-weight: var(--amount-minor-part-font-weight);
}
4 changes: 4 additions & 0 deletions packages/themes/src/mixins/amount/click.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@define-mixin amount-click {
--amount-major-part-font-weight: bold;
--amount-minor-part-font-weight: normal;
}
2 changes: 2 additions & 0 deletions packages/themes/src/mixins/click.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
@import './amount/click.css';
@import './input/click.css';
@import './pure-input/click.css';
@import './button/click.css';

@define-mixin theme-click {
@mixin amount-click;
@mixin input-click;
@mixin pure-input-click;
@mixin button-click;
Expand Down

0 comments on commit b4b0699

Please sign in to comment.