-
Notifications
You must be signed in to change notification settings - Fork 18
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
[PID-398] Removed rounded
from hardcode
#260
Conversation
rounded
from hardcoderounded
from hardcode
lib/moon/components/label.ex
Outdated
@@ -6,12 +6,15 @@ defmodule Moon.Components.Label do | |||
prop color, :string, default: "gohan-100", values: Moon.colors() | |||
prop background_color, :string, default: "piccolo-100", values: Moon.colors() | |||
prop size, :string, default: "default", values: ["small", "default"] | |||
prop class, :string | |||
prop class, :string, default: "rounded-sm" |
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.
Please check Surface documentation for :css_class attribute.
class={
"rounded-full": @Active
}
Also I find
@Active && "gohan-100" || "krillin-100"
More simple to read.
I do not understand why border radius is in default "class", but "color" and "background_color" are separate props...
Because of usage of Tailwind and automatically including used classes (PurgeCSS), agreement is that we use in the future:
background_class="bg-color-100"
color_class="text-color-100"
border_radius_class="rounded-md"
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.
Thank you @margusp2heathmont , I'm going to check
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.
Pls check caption.ex for ideal(?) new syntax style...
If any feedback or questions, please share. :)
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.
fixed!
Removed
rounded
from hardcode and set default value in propclass
https://coingaming.atlassian.net/browse/PID-398