-
Notifications
You must be signed in to change notification settings - Fork 62
Add a separator component #231
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
Conversation
7b2bce1 to
7039999
Compare
7039999 to
803d586
Compare
lib/ruby_ui/separator/separator.rb
Outdated
| end | ||
|
|
||
| def view_template(&) | ||
| public_send(@as, **attrs, &) |
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.
The as parameter could be a symbol, and then we could use tag phlex method here, eg.
| public_send(@as, **attrs, &) | |
| tag @as, **attrs, & |
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.
lib/ruby_ui/separator/separator.rb
Outdated
| data: { | ||
| orientation: @orientation | ||
| } |
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.
Is this data-attribute relevant (eg. for accessibility)? If not, we can remove it.
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.
It's only for styling, allowing different styles to be applied based on the value of data-orientation.
8ed68e1 to
eeb5945
Compare
eeb5945 to
902a364
Compare
902a364 to
b5fc427
Compare
|
Thanks 🥳 |
|
@lsouoliveira do you mind opening a PR adding this component to the docs? |

This PR adds a separator component based on the shadcn/ui separator.
horizontal | vertical.asparameterseparatorusing thedecorativeparameterDoc:
