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

feat(Toggle): Adds a loading and disabled state for the Toggle component #1239

Merged
merged 8 commits into from
May 8, 2024

Conversation

JohnathanWeisner
Copy link
Contributor

2024-05-07 16 42 40

Copy link
Collaborator

@akdetrick akdetrick left a 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

@@ -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"]),
Copy link
Collaborator

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:

Suggested change
size: PropTypes.oneOf(["small", "large"]),
size: PropTypes.oneOf(["s", "l"]),

isLoading = false,
children,
testId,
size = "large",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
size = "large",
size = "l",

>
<span className="nds-toggle-indicator elevation--low" />
<div className="nds-toggle-loading-overlay">
<LoadingShim size="small" isLoading />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<LoadingShim size="small" isLoading />
<LoadingShim size="s" isLoading />

className={cc([
"nds-loadingShim",
{
"nds-loadingShim--small": size === "small",
Copy link
Collaborator

@akdetrick akdetrick May 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"nds-loadingShim--small": size === "small",
"nds-loadingShim--small": size === "s",

Copy link

github-actions bot commented May 8, 2024

📘 Storybook Preview Available 👀

View the Storybook build from this PR in your browser:
https://60620d422ffdf100216415b2-gekicaetox.chromatic.com/

(This action will publish a new comment and url if this PR is modified)

@JohnathanWeisner JohnathanWeisner merged commit 6d83fed into main May 8, 2024
7 checks passed
@narmirobot
Copy link

🎉 This PR is included in version 3.36.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants