@kaizen/components 1.44.0 → 1.45.0
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/dist/cjs/Button/IconButton/IconButton.cjs +5 -3
- package/dist/cjs/index.css +2 -2
- package/dist/esm/Button/IconButton/IconButton.mjs +6 -4
- package/dist/esm/index.css +2 -2
- package/dist/styles.css +1 -1
- package/dist/types/Button/IconButton/IconButton.d.ts +3 -13
- package/package.json +3 -3
- package/src/Button/IconButton/IconButton.tsx +6 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { GenericProps, ButtonFormAttributes, WorkingProps, WorkingUndefinedProps, ButtonBadgeProps } from "../GenericButton";
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { GenericProps, ButtonFormAttributes, WorkingProps, WorkingUndefinedProps, ButtonBadgeProps, ButtonRef } from "../GenericButton";
|
|
3
3
|
export type IconButtonProps = GenericProps & ButtonFormAttributes & (WorkingProps | WorkingUndefinedProps) & {
|
|
4
4
|
label: string;
|
|
5
5
|
primary?: boolean;
|
|
@@ -17,14 +17,4 @@ export type IconButtonProps = GenericProps & ButtonFormAttributes & (WorkingProp
|
|
|
17
17
|
* {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3062890984/Button Guidance} |
|
|
18
18
|
* {@link https://cultureamp.design/?path=/docs/components-iconbutton--docs Storybook}
|
|
19
19
|
*/
|
|
20
|
-
export declare const IconButton:
|
|
21
|
-
(props: IconButtonProps): JSX.Element;
|
|
22
|
-
defaultProps: {
|
|
23
|
-
primary: boolean;
|
|
24
|
-
destructive: boolean;
|
|
25
|
-
disabled: boolean;
|
|
26
|
-
reversed: boolean;
|
|
27
|
-
secondary: boolean;
|
|
28
|
-
};
|
|
29
|
-
displayName: string;
|
|
30
|
-
};
|
|
20
|
+
export declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<ButtonRef | undefined>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaizen/components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.45.0",
|
|
4
4
|
"description": "Kaizen component library",
|
|
5
5
|
"author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
|
|
6
6
|
"homepage": "https://cultureamp.design",
|
|
@@ -108,8 +108,8 @@
|
|
|
108
108
|
"ts-node": "^10.9.2",
|
|
109
109
|
"ts-patch": "^3.1.2",
|
|
110
110
|
"typescript-transform-paths": "^3.4.7",
|
|
111
|
-
"@kaizen/
|
|
112
|
-
"@kaizen/
|
|
111
|
+
"@kaizen/design-tokens": "10.3.20",
|
|
112
|
+
"@kaizen/tailwind": "1.2.6"
|
|
113
113
|
},
|
|
114
114
|
"peerDependencies": {
|
|
115
115
|
"@cultureamp/i18n-react-intl": "^2.5.5",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react"
|
|
1
|
+
import React, { forwardRef, Ref } from "react"
|
|
2
2
|
import {
|
|
3
3
|
GenericButton,
|
|
4
4
|
GenericProps,
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
WorkingProps,
|
|
7
7
|
WorkingUndefinedProps,
|
|
8
8
|
ButtonBadgeProps,
|
|
9
|
+
ButtonRef,
|
|
9
10
|
} from "../GenericButton"
|
|
10
11
|
|
|
11
12
|
export type IconButtonProps = GenericProps &
|
|
@@ -28,8 +29,10 @@ export type IconButtonProps = GenericProps &
|
|
|
28
29
|
* {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3062890984/Button Guidance} |
|
|
29
30
|
* {@link https://cultureamp.design/?path=/docs/components-iconbutton--docs Storybook}
|
|
30
31
|
*/
|
|
31
|
-
export const IconButton = (
|
|
32
|
-
<
|
|
32
|
+
export const IconButton = forwardRef(
|
|
33
|
+
(props: IconButtonProps, ref: Ref<ButtonRef | undefined>): JSX.Element => (
|
|
34
|
+
<GenericButton iconButton {...props} ref={ref} />
|
|
35
|
+
)
|
|
33
36
|
)
|
|
34
37
|
|
|
35
38
|
IconButton.defaultProps = {
|