Skip to content
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

Fluent API for components #54

Open
astrowalker opened this issue Aug 5, 2021 · 0 comments
Open

Fluent API for components #54

astrowalker opened this issue Aug 5, 2021 · 0 comments

Comments

@astrowalker
Copy link

"Fluent" as C#/code, not CSS/Bootstrap.

Please provide fluent API -- this would allow easy way to add styling for example. If you take a look at for example FluentColumn this is basically closed class. But with Add/With method one could add extra styling in easy way (or maybe I don't know how to add them easy way ;-) ).

    public FluentColumn Add(string classes) => new FluentColumn(classes+" ",this.ToString());

Such method is not mutable, all other (already existing methods) could be rewritten avoiding mutability problem, and there would be easy way to express extra styling, like:

            var cls = col.xs.auto.Add("align-self-end");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant