Skip to content

Commit

Permalink
Rename Heroicons -> Beacon.Heroicons
Browse files Browse the repository at this point in the history
To avoid conflicts
  • Loading branch information
leandrocp committed Sep 25, 2024
1 parent ea560c5 commit 571864d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 51 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## 0.1.0-dev

### Fixes
* [Heroicons] Namespace the vendorized module as `Beacon.Heroicons` to avoid conflicts

### Documentation
* Added guide on how to embed tweets using the Twitter JS api

## 0.1.0-rc.2 (2024-09-20)

### Breaking Changes
Expand Down
2 changes: 1 addition & 1 deletion lib/beacon/content.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,7 @@ defmodule Beacon.Content do
|> String.replace("-", "_")
|> String.to_atom()
component = Function.capture(Heroicons, icon, 1)
component = Function.capture(Beacon.Heroicons, icon, 1)
{_, assigns} = get_and_update_in(assigns, [:rest, :class], fn current ->
current = current || ""
Expand Down
53 changes: 3 additions & 50 deletions lib/heroicons.ex
Original file line number Diff line number Diff line change
@@ -1,56 +1,9 @@
# https://github.com/mveytsman/heroicons_elixir/blob/afb57ff3e181fbcf55c68ff64a0e7f1d339a07d4/lib/heroicons.ex

defmodule Heroicons do
@moduledoc """
Provides precompiled icon compiles from [heroicons.com v2.1.5](heroicons.com).
# Namespace as `Beacon.` to avoid conflicts with the module in the `:heroicons` package
defmodule Beacon.Heroicons do
@moduledoc false

Heroicons are designed by [Steve Schoger](https://twitter.com/steveschoger)

## Usage

Hero icons come in four styles – outline (`24x24`), solid (`24x24`), mini (`20x20`) and micro(`16x16`).

By default, the icon components will use the outline style, but the `solid`,
`mini` or micro attributes may be passed to select styling, for example:

```heex
<Heroicons.cake />
<Heroicons.cake solid />
<Heroicons.cake mini />
<Heroicons.cake micro />
```

You can also pass arbitrary HTML attributes to the components:

```heex
<Heroicons.cake class="w-2 h-2" />
<Heroicons.cake solid class="w-2 h-2" />
```

## Heroicons License Attribution

MIT License

Copyright (c) 2020 Refactoring UI Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
"""
use Phoenix.Component

defp svg(assigns) do
Expand Down

0 comments on commit 571864d

Please sign in to comment.