@growth-angels/ds-core 1.25.1 → 1.25.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.
|
@@ -16,6 +16,7 @@ export const Button = (props) => {
|
|
|
16
16
|
};
|
|
17
17
|
return React.createElement(as || "button", {
|
|
18
18
|
...restProps,
|
|
19
|
+
"aria-label": props.ariaLabel,
|
|
19
20
|
className: classNames.join(" "),
|
|
20
21
|
onClick: handleClick,
|
|
21
22
|
}, _jsxs(_Fragment, { children: [icon && _jsx(Icon, { name: icon, size: "sm" }), children && children] }));
|
|
@@ -8,6 +8,7 @@ export type ButtonProps<T extends ElementType = "button"> = {
|
|
|
8
8
|
icon?: string;
|
|
9
9
|
preventDefault?: boolean;
|
|
10
10
|
children?: ReactNode;
|
|
11
|
+
ariaLabel?: string;
|
|
11
12
|
} & WordpressDefault & Omit<ComponentPropsWithoutRef<T>, "as" | "className" | "onClick"> & {
|
|
12
13
|
onClick?: MouseEventHandler<ElementRef<T>>;
|
|
13
14
|
};
|
package/package.json
CHANGED
|
@@ -18,12 +18,13 @@ export const Button = <T extends React.ElementType = "button">(props: ButtonProp
|
|
|
18
18
|
as || "button",
|
|
19
19
|
{
|
|
20
20
|
...restProps,
|
|
21
|
+
"aria-label": props.ariaLabel,
|
|
21
22
|
className: classNames.join(" "),
|
|
22
23
|
onClick: handleClick,
|
|
23
24
|
},
|
|
24
25
|
<>
|
|
25
26
|
{icon && <Icon name={icon} size="sm" />}
|
|
26
27
|
{children && children}
|
|
27
|
-
|
|
28
|
+
</>,
|
|
28
29
|
)
|
|
29
30
|
}
|
|
@@ -10,6 +10,7 @@ export type ButtonProps<T extends ElementType = "button"> = {
|
|
|
10
10
|
icon?: string
|
|
11
11
|
preventDefault?: boolean
|
|
12
12
|
children?: ReactNode
|
|
13
|
+
ariaLabel?: string
|
|
13
14
|
} & WordpressDefault &
|
|
14
15
|
Omit<ComponentPropsWithoutRef<T>, "as" | "className" | "onClick"> & {
|
|
15
16
|
onClick?: MouseEventHandler<ElementRef<T>>
|