-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Add default button and example #152
Add default button and example #152
Conversation
src/UI_Components/Button.re
Outdated
render( | ||
() => { | ||
let width = | ||
Monitor.getPrimaryMonitor() |
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 the default <Button />
styling - I think we should decouple this from the monitor size, and instead using some default padding
(along with perhaps a minWidth
). It'd be helpful to be able to drop a <Button />
anywhere, like in a side-pane - my concern is if we base it on 30% of the monitor size, it might not fit well in places you drop it (like if we had a 'left pane' / 'sidebar' for our examples)
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.
Thanks for the work on this and the feedback! It's looking really cool 👍
Had one piece of feedback regarding the default width sizing - let me know what you think.
7df59ce
to
f43ec16
Compare
@bryphe I've tweaked what you suggested (was more of a thing I had to test it out), I'm trying to make the example more dynamic using a |
1bfeceb
to
6e01470
Compare
@Akin909 any luck figuring out that bug yet? I looked through the code and couldn't find a clear issue. FWIW your use of |
@OhadRau thanks for having a look 👍 , the strange thing is that the the click event doesn't seem to work, I'm not sure if the state isn't updating, or if the |
Ah, I think I tracked it down. Looks like this is a rendering bug since printing from I thought the bug might be that Will have to investigate this some more later @Akin909 |
Thanks for such a thorough look @OhadRau, much appreciated I'm still trying to figure out how to debug stuff effectively in this environment. I'll have a look into why the render callback doesn't return true |
c21f0fc
to
d0952c1
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.
Just tried it out and it works great! Thanks for your work on this, @Akin909 ! 🎉
as there is currently no such thing as inheritance of styles
c6090ab
to
465ea10
Compare
Sorry about the build issues, @Akin909 ! Not related to your changes - working on fixing them in #178 |
The code changes look great! 💯 I'll bring them in and continue working on the build failure in #178 . So nice to have a base |
fixes #37