@sb1/ffe-buttons-react 18.0.0 → 18.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/types/index.d.ts +20 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sb1/ffe-buttons-react",
|
|
3
|
-
"version": "18.0.
|
|
3
|
+
"version": "18.0.2",
|
|
4
4
|
"description": "React implementation of ffe-buttons",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ffe"
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"publishConfig": {
|
|
47
47
|
"access": "public"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "1cc061a4349506626b518415e72dc7a87e56d5b3"
|
|
50
50
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export type MinimalBaseButtonProps = {
|
|
4
4
|
className?: string;
|
|
5
5
|
element?: HTMLElement | string | React.ElementType;
|
|
6
6
|
innerRef?: React.Ref<HTMLElement>;
|
|
7
|
-
}
|
|
7
|
+
} & React.ComponentProps<'button'> &
|
|
8
|
+
React.ComponentProps<'a'>;
|
|
8
9
|
|
|
9
|
-
export
|
|
10
|
+
export type BaseButtonProps = {
|
|
10
11
|
children?: React.ReactNode;
|
|
11
12
|
ariaLoadingMessage?: string;
|
|
12
13
|
disabled?: boolean;
|
|
13
14
|
isLoading?: boolean;
|
|
14
15
|
leftIcon?: React.ReactNode;
|
|
15
16
|
rightIcon?: React.ReactNode;
|
|
16
|
-
}
|
|
17
|
+
} & MinimalBaseButtonProps;
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
type ActionButtonProps = BaseButtonProps;
|
|
19
20
|
|
|
20
|
-
export
|
|
21
|
+
export type BackButtonProps = {
|
|
21
22
|
children?: React.ReactNode;
|
|
22
|
-
}
|
|
23
|
+
} & MinimalBaseButtonProps;
|
|
23
24
|
|
|
24
25
|
export interface ButtonGroupProps {
|
|
25
26
|
className?: string;
|
|
@@ -28,43 +29,43 @@ export interface ButtonGroupProps {
|
|
|
28
29
|
children: React.ReactNode;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
export
|
|
32
|
+
export type ExpandButtonProps = {
|
|
32
33
|
children: React.ReactNode;
|
|
33
34
|
closeLabel?: string;
|
|
34
35
|
leftIcon?: React.ReactNode;
|
|
35
36
|
rightIcon?: React.ReactNode;
|
|
36
37
|
isExpanded: boolean;
|
|
37
38
|
onClick: (e: React.MouseEvent | undefined) => void;
|
|
38
|
-
}
|
|
39
|
+
} & MinimalBaseButtonProps;
|
|
39
40
|
|
|
40
|
-
export
|
|
41
|
+
export type InlineExpandButtonProps = {
|
|
41
42
|
children?: React.ReactNode;
|
|
42
43
|
innerRef?: React.Ref<HTMLElement>;
|
|
43
44
|
isExpanded: boolean;
|
|
44
45
|
onClick: (e: React.MouseEvent | undefined) => void;
|
|
45
|
-
}
|
|
46
|
+
} & MinimalBaseButtonProps;
|
|
46
47
|
|
|
47
|
-
export
|
|
48
|
+
export type PrimaryButtonProps = BaseButtonProps;
|
|
48
49
|
|
|
49
|
-
export
|
|
50
|
+
export type SecondaryButtonProps = BaseButtonProps;
|
|
50
51
|
|
|
51
|
-
export
|
|
52
|
+
export type ShortcutButtonProps = {
|
|
52
53
|
children?: React.ReactNode;
|
|
53
54
|
disabled?: boolean;
|
|
54
55
|
leftIcon?: React.ReactNode;
|
|
55
|
-
}
|
|
56
|
+
} & MinimalBaseButtonProps;
|
|
56
57
|
|
|
57
|
-
export
|
|
58
|
+
export type TaskButtonProps = {
|
|
58
59
|
children?: React.ReactNode;
|
|
59
60
|
disabled?: boolean;
|
|
60
61
|
icon: React.ReactNode;
|
|
61
|
-
}
|
|
62
|
+
} & MinimalBaseButtonProps;
|
|
62
63
|
|
|
63
|
-
export
|
|
64
|
+
export type TertiaryButtonProps = {
|
|
64
65
|
children?: React.ReactNode;
|
|
65
66
|
leftIcon?: React.ReactNode;
|
|
66
67
|
rightIcon?: React.ReactNode;
|
|
67
|
-
}
|
|
68
|
+
} & MinimalBaseButtonProps;
|
|
68
69
|
|
|
69
70
|
type NoInfer<T> = [T][T extends any ? 0 : never];
|
|
70
71
|
|