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

SpinKit .sk-center utility class #2368

Closed
Jimmys20 opened this issue May 15, 2021 · 2 comments
Closed

SpinKit .sk-center utility class #2368

Jimmys20 opened this issue May 15, 2021 · 2 comments
Labels
Type: Feature ⚙ Request or idea for a new feature.
Milestone

Comments

@Jimmys20
Copy link
Contributor

Jimmys20 commented May 15, 2021

Spinkit library has the .sk-center utility class to position the spinner to the center of it's container. It would be nice if we could somehow apply this class, maybe using a boolean property named Centered e.g. <SpinKit Type="SpinKitType.Plane" Color="#ffcc00" Centered="true" />.

Also why is this Component not using enum for setting the color like the other components in Blazorise?

(Yes, I'm trying the latest preview 😝)

@stsrki
Copy link
Collaborator

stsrki commented May 16, 2021

I like the idea with Centered="true", if there is only that one option. In case there are left and right positions it might be smart to add an enum option.

I wanted to support SpinKit full specter colors and not be strictly tied to regular blazorise enum colors. Either case is good. If you think it might be a good idea to switch I might do it. And if anyone wanted to have custom colors it would be easy with Style parameter.

@Jimmys20
Copy link
Contributor Author

For starters, I think adding Class and Style parameters will be enough. Using the Class parameter I could easily position the spinner wherever I want with CSS.

Then, being able to set the position by parameter will not be necessary but still a nice-to-have feature. If you decide to implement that, I agree that using enum option would probably be a better idea.

For the colors, so far when setting the color of a Blazorise component from parameter, it usually takes a value of either the Color enum or some kind of variation e.g. TextColor, BorderColor, Background, SnackbarColor etc. So I was a bit surprised that this one accepted a string value but if there is a reason behind this then it's fine. Personally, I prefer using the context colors primary, secondary, success etc and if I want to style my app simply use the ThemeColorOptions.

@stsrki stsrki added the Type: Feature ⚙ Request or idea for a new feature. label May 16, 2021
@stsrki stsrki added this to the 0.9.4 milestone May 16, 2021
@stsrki stsrki mentioned this issue Jun 18, 2021
@stsrki stsrki closed this as completed Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature ⚙ Request or idea for a new feature.
Projects
Archived in project
Development

No branches or pull requests

2 participants