Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added hasFocus as deprecated prop #15571

Merged
merged 5 commits into from Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -109,9 +109,7 @@ Map {
"closeOnEscape": Object {
"type": "bool",
},
"hasFocus": Object {
"type": "bool",
},
"hasFocus": [Function],
"hideCloseButton": Object {
"type": "bool",
},
Expand Down
Expand Up @@ -843,6 +843,7 @@ export interface ActionableNotificationProps
closeOnEscape?: boolean;

/**
* @deprecated use StaticNotification once it's available. Issue #15532
* Specify if focus should be moved to the component when the notification contains actions
*/
hasFocus?: boolean;
Expand Down Expand Up @@ -1102,9 +1103,10 @@ ActionableNotification.propTypes = {
closeOnEscape: PropTypes.bool,

/**
* Deprecated, please use StaticNotification once it's available. Issue #15532
* Specify if focus should be moved to the component when the notification contains actions
*/
hasFocus: PropTypes.bool,
hasFocus: deprecate(PropTypes.bool),

/**
* Specify the close button should be disabled, or not
Expand Down
Expand Up @@ -40,6 +40,14 @@ export const Default = () => (
/>
);

Default.argTypes = {
hasFocus: {
table: {
disable: true,
},
},
};

export const Playground = (args) => <ActionableNotification {...args} />;

Playground.argTypes = {
Expand Down Expand Up @@ -72,6 +80,11 @@ Playground.argTypes = {
disable: true,
},
},
hasFocus: {
table: {
disable: true,
},
},
};
Playground.args = {
actionButtonLabel: 'Action',
Expand Down