-
-
Notifications
You must be signed in to change notification settings - Fork 430
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
refactor(toggleswitch.tsx): toggleSwitch optional props #928
Conversation
ToggleSwitch optional props themesberg#925
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #928 +/- ##
==========================================
- Coverage 99.54% 99.51% -0.04%
==========================================
Files 163 167 +4
Lines 6621 6942 +321
Branches 401 421 +20
==========================================
+ Hits 6591 6908 +317
- Misses 30 34 +4
☔ View full report in Codecov by Sentry. |
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.
Thank you for taking this issue on! I know we have tons of existing code where we do this, but we would like to change the pattern of
{booleanCondition && <SomeJSX />}
to
{booleanCondition ? <SomeJSX /> : null}
The first example will cause a 0 to appear if the condition is false.
Also, if you could add an example to the docs for <ToggleSwitch>
where the label
is omitted, that would be greatly appreciated.
Okay! I'll make the changes asap |
improved quality of code
* refactor(toggleswitch.tsx): toggleSwitch optional props ToggleSwitch optional props themesberg#925 * refactor(better sintax): improved quality of code improved quality of code
ToggleSwitch optional props
#925