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

Replace card_horizontal component with card attr. #28

Merged
merged 2 commits into from
Jan 17, 2025

Conversation

houhoulis
Copy link
Member

Instead of separate card and card_horizontal components, add the :direction attribute to the card component.

Resolves #17 .

Instead of separate card and card_horizontal components, add the
:direction attribute to the card component.

defp content_card_horizontal(assigns) do
defp content_card(assigns) do
Copy link
Member Author

Choose a reason for hiding this comment

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

I could have pattern-matched the content_card function the way I did the card function. But there is only one word's difference between the two content_card function bodies, so I used one if statement to consolidate.

Co-authored-by: Mike Binns <[email protected]>
@houhoulis houhoulis merged commit ae1d4d2 into main Jan 17, 2025
4 checks passed
@houhoulis houhoulis deleted the ch/replace_card_horizontal_with_card_attr branch January 17, 2025 18:01
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.

Consolidate card into a single component function name
2 participants