Skip to content

Commit

Permalink
Rename closeButtonLabel prop
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer committed Jun 22, 2021
1 parent eb2daf3 commit b23b472
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/circuit-ui/components/Modal/Modal.docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function SayHello({ name }) {
setModal({
children: <Body>Hello {name}</Body>,
variant: 'immersive',
labelCloseButton: 'Close modal',
closeButtonLabel: 'Close modal',
});
};

Expand Down
2 changes: 1 addition & 1 deletion packages/circuit-ui/components/Modal/Modal.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('Modal', () => {
const defaultModal: ModalProps = {
variant: 'immersive',
isOpen: true,
labelCloseButton: 'Close modal',
closeButtonLabel: 'Close modal',
onClose: jest.fn(),
// eslint-disable-next-line react/prop-types, react/display-name
children: () => <p data-testid="children">Hello world!</p>,
Expand Down
6 changes: 3 additions & 3 deletions packages/circuit-ui/components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export interface ModalProps extends BaseModalProps {
* Text label for the close button for screen readers.
* Important for accessibility.
*/
labelCloseButton: string;
closeButtonLabel: string;
/**
* Allow user to close the modal by clicking/tapping the overlay or pressing
* the escape key. Default true.
Expand All @@ -80,7 +80,7 @@ export const Modal: ModalComponent<ModalProps> = ({
onClose,
variant,
dismissible = true,
labelCloseButton,
closeButtonLabel,
tracking = {},
className,
...props
Expand Down Expand Up @@ -206,7 +206,7 @@ export const Modal: ModalComponent<ModalProps> = ({
{dismissible && (
<CloseButton
onClick={onClose}
label={labelCloseButton}
label={closeButtonLabel}
css={closeButtonStyles}
/>
)}
Expand Down

0 comments on commit b23b472

Please sign in to comment.