-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat(Toggle): Adds a loading and disabled state for the Toggle component #1239
feat(Toggle): Adds a loading and disabled state for the Toggle component #1239
Conversation
JohnathanWeisner
commented
May 7, 2024
…oggle--loading-and-disabled-states
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor naming nitpick but this otherwise looks good
src/LoadingShim/index.js
Outdated
@@ -36,6 +49,8 @@ LoadingShim.propTypes = { | |||
isLoading: PropTypes.bool, | |||
/** Optional value for `data-testid` attribute */ | |||
testId: PropTypes.string, | |||
/** Size of the loading indicator */ | |||
size: PropTypes.oneOf(["small", "large"]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for consistency with other size names:
size: PropTypes.oneOf(["small", "large"]), | |
size: PropTypes.oneOf(["s", "l"]), |
src/LoadingShim/index.js
Outdated
isLoading = false, | ||
children, | ||
testId, | ||
size = "large", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
size = "large", | |
size = "l", |
src/Toggle/index.js
Outdated
> | ||
<span className="nds-toggle-indicator elevation--low" /> | ||
<div className="nds-toggle-loading-overlay"> | ||
<LoadingShim size="small" isLoading /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<LoadingShim size="small" isLoading /> | |
<LoadingShim size="s" isLoading /> |
src/LoadingShim/index.js
Outdated
className={cc([ | ||
"nds-loadingShim", | ||
{ | ||
"nds-loadingShim--small": size === "small", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"nds-loadingShim--small": size === "small", | |
"nds-loadingShim--small": size === "s", |
📘 Storybook Preview Available 👀View the Storybook build from this PR in your browser: (This action will publish a new comment and url if this PR is modified) |
🎉 This PR is included in version 3.36.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |