diff --git a/packages/plasma-b2c/.storybook/decoratorViewContainer.tsx b/packages/plasma-b2c/.storybook/decoratorViewContainer.tsx new file mode 100644 index 0000000000..7b1043691b --- /dev/null +++ b/packages/plasma-b2c/.storybook/decoratorViewContainer.tsx @@ -0,0 +1,28 @@ +import React from 'react'; + +import { ViewContainer } from '../src/components/ViewContainer/ViewContainer'; + +export const withViewContainer = (Story, context) => { + return ( + <> +
+

Default view

+ + + +
+
+

OnDark view

+ + + +
+
+

OnLight view

+ + + +
+ + ); +}; diff --git a/packages/plasma-b2c/.storybook/preview.ts b/packages/plasma-b2c/.storybook/preview.ts index 151d88c9c1..74c5fdbaba 100644 --- a/packages/plasma-b2c/.storybook/preview.ts +++ b/packages/plasma-b2c/.storybook/preview.ts @@ -2,6 +2,7 @@ import type { Preview } from '@storybook/react'; import { withKnobs } from '@storybook/addon-knobs'; import { withTheme } from './decoratorThemes'; import { withToast } from './decoratorToast'; +import { withViewContainer } from './decoratorViewContainer'; // Workaround: to make VoiceOver read russian text properly if (typeof document !== 'undefined') { @@ -9,7 +10,7 @@ if (typeof document !== 'undefined') { } const preview: Preview = { - decorators: [withKnobs, withTheme, withToast], + decorators: [withKnobs, withViewContainer, withTheme, withToast], globalTypes: { theme: { description: 'Global theme for components', diff --git a/packages/plasma-b2c/src/components/Button/Button.config.ts b/packages/plasma-b2c/src/components/Button/Button.config.ts index ee2b8ed518..894fed8bb6 100644 --- a/packages/plasma-b2c/src/components/Button/Button.config.ts +++ b/packages/plasma-b2c/src/components/Button/Button.config.ts @@ -1,5 +1,36 @@ import { css, buttonTokens } from '@salutejs/plasma-new-hope/styled-components'; + + +// applyOnLight() { +// button: css` +// --inverse-text-primary: +// --surface-solid-default: +// --inverse-text-primary: +// --surface-solid-default-hover: +// --inverse-text-primary: +// --surface-solid-default-active: +// +// +// +// ` +// } +// +/// applyOnDark() { +/// return css` +/// --text-primary: var(--on-dark-text-primary); +/// --text-secondary: var(--on-dark-text-secondary); +/// --text-positive: var(--on-dark-text-positive); +/// +/// --inverse-text-primary: var(--on-light-text-primary); +/// `; +/// } +/// +/// +///