Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
AliOsm committed Sep 1, 2024
1 parent 3138606 commit fec7043
Showing 1 changed file with 25 additions and 19 deletions.
44 changes: 25 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@

# Phlex::Icons

General icons extension for [Phlex](https://phlex.fun). Includes more than 4,000 icons from:
- [Heroicons](https://heroicons.com) (300+)
- [Lucide Icons](https://lucide.dev/icons) (1,500+)
General icons extension for [Phlex](https://phlex.fun). Includes more than 7,000 icons from:
- [Bootstrap Icons](https://icons.getbootstrap.com) (2,000+)
- [Flag Icons](https://flagicons.lipis.dev) (250+)
- [Heroicons](https://heroicons.com) (300+)
- [Lucide Icons](https://lucide.dev/icons) (1,500+)
- [Remix Icons](https://remixicon.com) (2,800+)

And happy to extend to other icon packs!

Expand Down Expand Up @@ -45,6 +46,22 @@ end
Phlex::Icons.configuration.default_classes = 'size-6'
```

### Bootstrap Icons configuration

Nothing to configure for Bootstrap Icons.

### Flag Icons configuration

```ruby
Phlex::Icons::Flag.configure do |config|
config.default_variant = :square # or :rectangle
end

# OR

Phlex::Icons::Flag.configuration.default_variant = :square # or :rectangle
```

### Heroicons configuration

```ruby
Expand All @@ -61,21 +78,9 @@ Phlex::Icons::Hero.configuration.default_variant = :solid # or :outline

Nothing to configure for Lucide Icons.

### Bootstrap Icons configuration

Nothing to configure for Bootstrap Icons.

### Flag Icons configuration
### Remix Icons configuration

```ruby
Phlex::Icons::Flag.configure do |config|
config.default_variant = :square # or :rectangle
end

# OR

Phlex::Icons::Flag.configuration.default_variant = :square # or :rectangle
```
Nothing to configure for Remix Icons.

## Usage

Expand All @@ -85,10 +90,11 @@ require 'phlex_icons'
class PhlexIcons < Phlex::HTML
def view_template
div do
render Phlex::Icons::Hero::Home.new(variant: :solid, classes: 'size-4')
render Phlex::Icons::Lucide::House.new(classes: 'size-4')
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::Remix::HomeLine.new(classes: 'size-4')
end
end
end
Expand Down

0 comments on commit fec7043

Please sign in to comment.