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
Button - add additional element support? #70
Comments
I think it would make sense to use have:
We can probably add |
Ok I'll get a PR going later to add these and get some feedback. I hadn't heard of it being on a div, according to the Bulma docs. I was just going to make
I get the hesitance for submit since it can only go on a button and users could use the intellisense to think they can put it on any of the button types (like I did when I discovered it's being rendered as an anchor element atm 😄 ) |
Sure feel free to open a PR and yes if we specialize one helper with |
Ok, so I am adding:
But not If you really need it, feel free to re-open to discuss it further. |
What about leaving As an aside, I'm not sure what value button_div has tbh, especially when the bulma docs don't even mention this as an option, but if it works I guess no big deal there. Sorry I didn't get a PR last week, things kept coming up. I have an almost completed PR for Steps extension almost done too, just need to fix up docs. |
In reality, you can use the button class to a
I wanted to add the div element, because if we use the Again, if we provide one custom function Again, what's the benefit of having an Here the visual display is the same. When I provided custom helpers at the time it's was because there was some really small change when using one or another version. But I think, it's probably no more the case and it's kind of something I regret because it's add complexity which is not needed. Edit: For the next version of Fulma, I will revert my change on the button element (it's better :) ). And, I will explain in the documentation that's we only genera the |
My main reasoning is when using Fulma without Elmish. Button isn't in Fulma.Elmish and there are non-Elmish use cases that Fulma is a great fit for as well. Main use case is being able to add type="submit". Even if the DSL doesn't encourage the submit type, Fulma can enable the form submission use case without having additional helpers by adding a custom prop via the existing apis. For my case, even though I am using Elmish, I actually prefer the form submission approach for most of my forms there too. Instead of firing Msgs for each and every keystroke / input change, I'd rather tie into the form's onchange/onsubmit to do validation + group up the data to cut down on the amount of plumbing I need in the application state components. Instead, the plumbing stays in the View and I only dispatch application messages when form's validation state changes or a valid form is submitted. |
Hum, ok. Also, as Fulma can be used to render static web site it can make sense. So, I will provide:
Like so, we are supporting the same scope as Bulma documentation. |
Ran into this because I was expecting
Button.button
to be abutton
element when rendered, not ana
.Since Bulma can style buttons using
a
,button
, andinput type="button|submit|reset"
, should there beButton.button
,Button.button_a
,Button.button_input
like some of the others components that have multiple ways of being represented?The text was updated successfully, but these errors were encountered: