Skip to content

Latest commit

 

History

History
73 lines (41 loc) · 3.12 KB

README.md

File metadata and controls

73 lines (41 loc) · 3.12 KB
PhlexUI logo

This is the repo for the docs of PhlexyUI, a Ruby UI component library for DaisyUI using Phlex ✨

🔧 Development

After checking out the repo, run bin/setup to install dependencies. Then, run bundle exec rspec to run the tests.

💻 Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/PhlexyUI/phlexy_ui_docs. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

How to

  1. Visit the docs to see which components are still not implemented or not yet added to the docs.

  2. If not implemented yet, implement it on the PhlexyUI repo.

  3. Add it to the docs by adding it to this repo. See using the generators section to see how to do so.

  4. Celebrate 🎉

Using the generators

You can use the generators to make contributing easier:

New component

If you're adding a new component (e.g. a component that is shown as greyed out on the docs sidebar), use bin/rails generate example_view. This generates a new component example view and a basic component.

e.g. To add the "Menu" component under the "Navigation" category, run:

bin/rails generate example_view Menu Navigation

This will create:

  • app/views/examples/menus/show_view.rb
  • app/views/components/examples/menus/basic_component.rb

It will also append the component in components.yml file under the "Navigation" section and restart the server.

New example

If you're adding a new example to an existing component (e.g. a component that is visitable on the docs sidebar), use bin/rails generate example_component. This generates a new component example.

e.g. To add a "Responsive menu" example to the Menu component, run:

bin/rails generate example_component Menus::Responsive "Optional title"

This will create:

  • app/views/components/examples/menus/responsive_component.rb

It will also append the component to the Examples::Menus::ShowView under the render_examples section.

Note

When adding or modifying a component example's example method, you might encounter a MethodSource::SourceNotFoundError. This is a bug with the method_source gem used to automatically display and render the examples. To fix it, just restart your server.

📃 License

The gem is available as open source under the terms of the MIT License.

☝️ Code of Conduct

Everyone interacting in the PhlexyUI project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.