From cab132a48ac88029b927fb7a17c974818d250fb1 Mon Sep 17 00:00:00 2001 From: Ali Hamdi Ali Fadel Date: Wed, 25 Sep 2024 18:44:48 +0000 Subject: [PATCH] Update README.md --- README.md | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index d818119d..3f9eb6d1 100644 --- a/README.md +++ b/README.md @@ -131,13 +131,13 @@ class PhlexIcons < Phlex::HTML def view_template div do - Bootstrap::House(classes: 'size-4') - Flag::Sa(variant: :rectangle, classes: 'size-4') - Hero::Home(variant: :solid, classes: 'size-4') - Lucide::House(classes: 'size-4') - Radix::Home(classes: 'size-4') - Remix::HomeLine(classes: 'size-4') - Tabler::Home(variant: :filled, classes: 'size-4') + Bootstrap::House(class: 'size-4') + Flag::Sa(variant: :rectangle, class: 'size-4') + Hero::Home(variant: :solid, class: 'size-4') + Lucide::House(class: 'size-4') + Radix::Home(class: 'size-4') + Remix::HomeLine(class: 'size-4') + Tabler::Home(variant: :filled, class: 'size-4') end end end @@ -151,13 +151,13 @@ require 'phlex-icons' # No need to require the gem if you are using it in a Rail class PhlexIcons < Phlex::HTML def view_template div do - render Phlex::Icons::Bootstrap::House.new(classes: 'size-4') - render Phlex::Icons::Flag::Sa.new(variant: :rectangle, classes: 'size-4') - render Phlex::Icons::Hero::Home.new(variant: :solid, classes: 'size-4') - render Phlex::Icons::Lucide::House.new(classes: 'size-4') - render Phlex::Icons::Radix::Home.new(classes: 'size-4') - render Phlex::Icons::Remix::HomeLine.new(classes: 'size-4') - render Phlex::Icons::Tabler::Home.new(variant: :filled, classes: 'size-4') + render Phlex::Icons::Bootstrap::House.new(class: 'size-4') + render Phlex::Icons::Flag::Sa.new(variant: :rectangle, class: 'size-4') + render Phlex::Icons::Hero::Home.new(variant: :solid, class: 'size-4') + render Phlex::Icons::Lucide::House.new(class: 'size-4') + render Phlex::Icons::Radix::Home.new(class: 'size-4') + render Phlex::Icons::Remix::HomeLine.new(class: 'size-4') + render Phlex::Icons::Tabler::Home.new(variant: :filled, class: 'size-4') end end end @@ -181,12 +181,12 @@ class PhlexIcons < Phlex::HTML def view_template div do # With Phlex::Kit. - Flag::Sa(variant: :rectangle, classes: 'size-4') - Hero::Home(variant: :solid, classes: 'size-4') + Flag::Sa(variant: :rectangle, class: 'size-4') + Hero::Home(variant: :solid, class: 'size-4') # Without Phlex::Kit. - render Phlex::Icons::Flag::Sa.new(variant: :rectangle, classes: 'size-4') - render Phlex::Icons::Hero::Home.new(variant: :solid, classes: 'size-4') + render Phlex::Icons::Flag::Sa.new(variant: :rectangle, class: 'size-4') + render Phlex::Icons::Hero::Home.new(variant: :solid, class: 'size-4') end end end @@ -232,6 +232,10 @@ Now, you can use your custom icons like any other icon pack as described above. All icon packs provided in this gem are auto-generated by their generator under [`generators`](/generators) directory. You just need to clone the repo and run the generator for the icon pack you want to update. Also, there is a GitHub Action that will run the generator for all icon packs and update the gem weekly on each Friday. +## What is the icon pack version used in the gem? + +Each icon pack contains a `VERSION` constant in its module represents the version of the icon pack used in the gem. So, for example, to get the Bootstrap version used in the gem you can access it by `Phlex::Icons::Bootstrap::VERSION`. + ## Development After checking out the repo, open it in VSCode and click `Reopen in Container` to start a development container. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.