Git Product home page Git Product logo

Comments (7)

mveytsman avatar mveytsman commented on May 28, 2024 6

0.3.1 is published on hex.pm!

from heroicons_elixir.

joefreeman avatar joefreeman commented on May 28, 2024 1

FWIW, I'd been hoping to do something like this:

defp some_component(assigns) do
  ~H"""
  <.icon_component icon={&Heroicons.Solid.lightning_bolt/1} text="Something" />
  """
end

defp icon_component(assigns) do
  ~H"""
  <%= @icon.(class: "h-4 w-4 ...") %> <%= @text %>
  """
end

But getting lots of warnings.

from heroicons_elixir.

mveytsman avatar mveytsman commented on May 28, 2024 1

I think you make a good point @soundmonster @joefreeman I'll cut a new version without the warnings

from heroicons_elixir.

mveytsman avatar mveytsman commented on May 28, 2024

I deprecated the function versions of the components in favor of the Phoenix components - which achieves what your icon wrapper does

You can now use <Heroicons.Outline.foo> as a Phoenix component in your code directly

I noted this in the readme but this is a good nudge to keep a change log and make the deprecation warning tell you what to do

Keeping this issue to track that

from heroicons_elixir.

cadebward avatar cadebward commented on May 28, 2024

Oh! That's my bad for not reading better. Thanks for pointing that out and thanks for the quick response! <3

from heroicons_elixir.

Daniel-Xu avatar Daniel-Xu commented on May 28, 2024

I deprecated the function versions of the components in favor of the Phoenix components - which achieves what your icon wrapper does

You can now use <Heroicons.Outline.foo> as a Phoenix component in your code directly

I noted this in the readme but this is a good nudge to keep a change log and make the deprecation warning tell you what to do

Keeping this issue to track that

Thanks for the response. I have a minor doubt: what if we want to reuse common class, it seems not easy to wrap <Heroicons.Outline.foo> in a new component.

from heroicons_elixir.

soundmonster avatar soundmonster commented on May 28, 2024

Having a way to parameterize the icon was very handy and feels like a valid use case, e.g. for generating navigation links.

from heroicons_elixir.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.