PricingBlog

Component slot and repeating svg? is this possible?

  • mesmoiron-1279418507615928432

    mesmoiron

    1 year ago

    I don't know if this is possible. I have a table that has a field that holds the svg code. It would be nice if I could use that in a repeat item in the slot of a component. Could this be done? I noticed that svg only works when directly copied into the slot. But then it cannot be repeated.
  • tomthebigtree-1279479466606985309

    Tom Ireland

    1 year ago

    You can repeat SVG if there is only one path and you use the d attribute. I have done this with sidebar icons using an object to specific the list with menu name, SVG d icon data, etc. So you could repeat your slotted SVG based on a list and then the SVG d attribute can use the repeat item data. Make sense?
  • mesmoiron-1280427503516913704

    mesmoiron

    1 year ago

    Aah thank you. I should explore the options on the fields and buttons more.
  • tomthebigtree-1280436201349840971

    Tom Ireland

    1 year ago

    No problem. Good luck and let us know how you get on.
  • mesmoiron-1281196824832770118

    mesmoiron

    1 year ago

    Yes, I will.
    👍1