-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Feature requests #42
Comments
4)
|
The trick here is that Also, for testing purposes, |
Yeah that makes sense. Was mainly referring to all the color related sequences. |
5) Support non-primitive values in
|
I just added a Thanks as always for the excellent feedback! |
Just going to note all my requests/ideas here:
1) Rename
Box
toView
Self-explanatory. Just collides with Rust native
Box
.2) Support a
Handler
with a return valueI'm working on form/input components and I'm adding a validate function kind of prop, which works. https://github.com/moonrepo/starbase/blob/console/crates/console/src/components/input.rs#L13
However, I had to basically copy all of the
Handler
code to make it work, as I needed a return type ofOption<String>
(invalid with error message or valid). https://github.com/moonrepo/starbase/blob/console/crates/console/src/components/mod.rs#L29Would be nice to have a built-in type for a handler with a return function. Adding it to the existing
Handler
may be too much, as we would then need to return()
everywhere or something. So a new type maybe best.3) Prop type that can be a
String
orAnyElement
I've found myself needing this pattern a lot just for convenience. Basically I want something like this:
So that when we're rendering, we can use a simple string (which would just render
Text
under the hood):Or we can customize with a specific element:
The text was updated successfully, but these errors were encountered: