Skip to content

Commit

Permalink
feat: add aria attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
fabio-aiello-appfolio committed Sep 27, 2023
1 parent 1997762 commit bff68a3
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
import { Button } from 'reactstrap';
import React from 'react';
import { Button as RsButton } from 'reactstrap';

const Button = ({ disabled = false, block = false, outline = false, ...props }) => (
<RsButton
{...props}
disabled={disabled}
block={block}
outline={outline}
role="button"
aria-disabled={disabled}
aria-labelledby={typeof props.children === 'string' ? props.children : undefined}
/>
);

export type { ButtonProps } from 'reactstrap';

Expand Down

0 comments on commit bff68a3

Please sign in to comment.