Skip to content

Commit

Permalink
feat(Button): add aria-hidden prop
Browse files Browse the repository at this point in the history
  • Loading branch information
YossiSaadi committed Feb 8, 2024
1 parent e8b78e8 commit a86bdfb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export interface ButtonProps extends VibeComponentProps {
/** aria controls - receives id for the controlled region */
ariaControls?: string;
"aria-describedby"?: AriaAttributes["aria-describedby"];
"aria-hidden"?: AriaAttributes["aria-hidden"];
/** On Button Focus callback */
onFocus?: (event: React.FocusEvent<HTMLButtonElement>) => void;
/** On Button Blur callback */
Expand Down Expand Up @@ -136,6 +137,7 @@ const Button: VibeComponent<ButtonProps, unknown> & {
ariaExpanded,
ariaControls,
"aria-describedby": ariaDescribedBy,
"aria-hidden": ariaHidden,
blurOnMouseUp,
dataTestId: backwardCompatabilityDataTestId,
"data-testid": dataTestId,
Expand Down Expand Up @@ -261,7 +263,8 @@ const Button: VibeComponent<ButtonProps, unknown> & {
"aria-haspopup": ariaHasPopup,
"aria-expanded": ariaExpanded,
"aria-controls": ariaControls,
"aria-describedby": ariaDescribedBy
"aria-describedby": ariaDescribedBy,
"aria-hidden": ariaHidden
};
return props;
}, [
Expand All @@ -285,7 +288,8 @@ const Button: VibeComponent<ButtonProps, unknown> & {
ariaHasPopup,
ariaExpanded,
ariaControls,
ariaDescribedBy
ariaDescribedBy,
ariaHidden
]);

const leftIconSize = useMemo(() => {
Expand Down

0 comments on commit a86bdfb

Please sign in to comment.