@salutejs/plasma-new-hope 0.76.5-dev.0 → 0.76.6-canary.1183.8752730341.0
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salutejs/plasma-new-hope",
|
3
|
-
"version": "0.76.
|
3
|
+
"version": "0.76.6-canary.1183.8752730341.0",
|
4
4
|
"description": "Salute Design System blueprint",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "es/index.js",
|
@@ -102,5 +102,5 @@
|
|
102
102
|
"react-popper": "2.3.0",
|
103
103
|
"storeon": "3.1.5"
|
104
104
|
},
|
105
|
-
"gitHead": "
|
105
|
+
"gitHead": "c52bccd1a037d7f43112a76f5aeab394d879704c"
|
106
106
|
}
|
@@ -1,6 +1,9 @@
|
|
1
|
-
import
|
1
|
+
import * as React from 'react';
|
2
|
+
import type { ComponentProps } from 'react';
|
2
3
|
import type { StoryObj, Meta } from '@storybook/react';
|
4
|
+
import { disableProps } from '@salutejs/plasma-sb-utils';
|
3
5
|
|
6
|
+
import { IconMic } from '../../../../components/_Icon';
|
4
7
|
import { buttonConfig } from '../../../../components/Button';
|
5
8
|
import { mergeConfig } from '../../../../engines';
|
6
9
|
import { WithTheme, argTypesFromConfig } from '../../../_helpers';
|
@@ -12,6 +15,16 @@ const meta: Meta<typeof Button> = {
|
|
12
15
|
title: 'plasma_b2c/Button',
|
13
16
|
decorators: [WithTheme],
|
14
17
|
component: Button,
|
18
|
+
args: {
|
19
|
+
text: 'Hello',
|
20
|
+
view: 'default',
|
21
|
+
size: 'm',
|
22
|
+
disabled: false,
|
23
|
+
focused: true,
|
24
|
+
square: false,
|
25
|
+
stretching: 'auto',
|
26
|
+
isLoading: false,
|
27
|
+
},
|
15
28
|
argTypes: {
|
16
29
|
...argTypesFromConfig(mergeConfig(buttonConfig, config)),
|
17
30
|
pin: {
|
@@ -41,15 +54,18 @@ const meta: Meta<typeof Button> = {
|
|
41
54
|
|
42
55
|
export default meta;
|
43
56
|
|
44
|
-
export const Default: StoryObj<ComponentProps<typeof Button>> = {
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
57
|
+
export const Default: StoryObj<ComponentProps<typeof Button>> = {};
|
58
|
+
|
59
|
+
export const AccessibilityWithChildren: StoryObj<ComponentProps<typeof Button>> = {
|
60
|
+
argTypes: { ...disableProps(['text']) },
|
61
|
+
render: (props: ComponentProps<typeof Button>) => {
|
62
|
+
const args = { ...props, text: undefined };
|
63
|
+
|
64
|
+
return (
|
65
|
+
<Button {...args}>
|
66
|
+
<IconMic color="inherit" />
|
67
|
+
<span>Включить микрофон</span>
|
68
|
+
</Button>
|
69
|
+
);
|
54
70
|
},
|
55
71
|
};
|
@@ -1,6 +1,9 @@
|
|
1
|
-
import
|
1
|
+
import * as React from 'react';
|
2
|
+
import type { ComponentProps } from 'react';
|
2
3
|
import type { StoryObj, Meta } from '@storybook/react';
|
4
|
+
import { disableProps } from '@salutejs/plasma-sb-utils';
|
3
5
|
|
6
|
+
import { IconMic } from '../../../../components/_Icon';
|
4
7
|
import { buttonConfig } from '../../../../components/Button';
|
5
8
|
import { mergeConfig } from '../../../../engines';
|
6
9
|
import { WithTheme, argTypesFromConfig } from '../../../_helpers';
|
@@ -12,6 +15,16 @@ const meta: Meta<typeof Button> = {
|
|
12
15
|
title: 'plasma_b2c/Button',
|
13
16
|
decorators: [WithTheme],
|
14
17
|
component: Button,
|
18
|
+
args: {
|
19
|
+
text: 'Hello',
|
20
|
+
view: 'default',
|
21
|
+
size: 'm',
|
22
|
+
disabled: false,
|
23
|
+
focused: true,
|
24
|
+
square: false,
|
25
|
+
stretching: 'auto',
|
26
|
+
isLoading: false,
|
27
|
+
},
|
15
28
|
argTypes: {
|
16
29
|
...argTypesFromConfig(mergeConfig(buttonConfig, config)),
|
17
30
|
pin: {
|
@@ -41,15 +54,18 @@ const meta: Meta<typeof Button> = {
|
|
41
54
|
|
42
55
|
export default meta;
|
43
56
|
|
44
|
-
export const Default: StoryObj<ComponentProps<typeof Button>> = {
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
57
|
+
export const Default: StoryObj<ComponentProps<typeof Button>> = {};
|
58
|
+
|
59
|
+
export const AccessibilityWithChildren: StoryObj<ComponentProps<typeof Button>> = {
|
60
|
+
argTypes: { ...disableProps(['text']) },
|
61
|
+
render: (props: ComponentProps<typeof Button>) => {
|
62
|
+
const args = { ...props, text: undefined };
|
63
|
+
|
64
|
+
return (
|
65
|
+
<Button {...args}>
|
66
|
+
<IconMic color="inherit" />
|
67
|
+
<span>Включить микрофон</span>
|
68
|
+
</Button>
|
69
|
+
);
|
54
70
|
},
|
55
71
|
};
|