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

[PID-398] Removed rounded from hardcode #260

Merged
merged 3 commits into from
May 13, 2022
Merged

[PID-398] Removed rounded from hardcode #260

merged 3 commits into from
May 13, 2022

Conversation

iamdanchi
Copy link
Contributor

Removed rounded from hardcode and set default value in prop class

https://coingaming.atlassian.net/browse/PID-398

@iamdanchi iamdanchi changed the title Removed rounded from hardcode [PID-398] Removed rounded from hardcode May 13, 2022
@@ -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"
Copy link
Collaborator

@theycallmehero theycallmehero May 13, 2022

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"

Copy link
Contributor Author

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

Copy link
Collaborator

@theycallmehero theycallmehero May 13, 2022

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. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed!

@theycallmehero theycallmehero merged commit c9f1ba5 into main May 13, 2022
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

Successfully merging this pull request may close these issues.

2 participants