-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
UI Base package #13024
UI Base package #13024
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
1ce640d
to
82b3303
Compare
82b3303
to
d761f3e
Compare
d761f3e
to
efab8aa
Compare
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.
lgtm besides one small thing - excited about this!
</div> | ||
); | ||
}, | ||
} satisfies Meta<typeof Button>; |
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.
nioce improved type safety 😉
efab8aa
to
4f40c60
Compare
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.
Re-stamp!
({ variant, size, loading, children, before, after, asChild, ...props }, ref) => { | ||
const Comp = asChild ? Slot : 'button'; | ||
|
||
if (asChild && (loading || before || after)) { |
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.
Is there any benefit to enforcing this at the type level or too overkill maybe? This works fine though haha
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.
It's certainly possible, I was just thinking it's probably overkill, and I'm slowly getting convinced that consumers should just do the before / after themselves (loading is still iffy, but there's probably a clever way to do it without needing to compose the children layout).
## Description Describe the changes or additions included in this PR. ## Test Plan How did you test the new or updated feature? --- If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process. ### Type of Change (Check all that apply) - [ ] protocol change - [ ] user-visible impact - [ ] breaking change for a client SDKs - [ ] breaking change for FNs (FN binary must upgrade) - [ ] breaking change for validators or node operators (must upgrade binaries) - [ ] breaking change for on-chain data layout - [ ] necessitate either a data wipe or data migration ### Release notes
Description
Describe the changes or additions included in this PR.
Test Plan
How did you test the new or updated feature?
If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process.
Type of Change (Check all that apply)
Release notes