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

Unable to add class to RadioItem #1119

Closed
gwww opened this issue Mar 9, 2023 · 4 comments · Fixed by #1120
Closed

Unable to add class to RadioItem #1119

gwww opened this issue Mar 9, 2023 · 4 comments · Fixed by #1120
Assignees
Labels
bug Something isn't working

Comments

@gwww
Copy link

gwww commented Mar 9, 2023

Current Behavior

Adding class="<some class>" is explicitly removed from RadioItem here: https:/skeletonlabs/skeleton/blob/master/src/lib/components/Radio/RadioItem.svelte#L51. As a result I'm unable to use Tailwind classes to tailor the appearance of a RadioItem.

Work arounds are possible, e.g.: using a global style.

Some discussion here: https://discord.com/channels/1003691521280856084/1083254085047832586

Steps To Reproduce

No response

Anything else?

No response

@gwww gwww added the bug Something isn't working label Mar 9, 2023
@Sarenor
Copy link
Contributor

Sarenor commented Mar 9, 2023

You should be able to provide any custom classes in the exported props:

        export let rounded: CssClasses = getContext('rounded');
	export let padding: CssClasses = getContext('padding');
	export let active: CssClasses = getContext('active');
	export let hover: CssClasses = getContext('hover');
	export let color: CssClasses = getContext('color');
	export let fill: CssClasses = getContext('fill');

Tbf, they sound like they only take specific classes, but padding & rounding are always applied

@gwww
Copy link
Author

gwww commented Mar 9, 2023

That’s a good work around! Since I want to adjust padding I could put font size in that class list.

I’ll play around some more.

@endigo9740 endigo9740 added good first issue Good for newcomers help wanted Extra attention is needed and removed good first issue Good for newcomers help wanted Extra attention is needed labels Mar 9, 2023
@endigo9740 endigo9740 self-assigned this Mar 9, 2023
@endigo9740 endigo9740 linked a pull request Mar 9, 2023 that will close this issue
@endigo9740
Copy link
Contributor

@gwww Got a quick fix in place for this. This will be part of the next release this weekend!

@gwww
Copy link
Author

gwww commented Mar 9, 2023

Thanks! So much appreciated! Glad I can help, even if it’s not code contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants