d2 icon indicating copy to clipboard operation
d2 copied to clipboard

feature: link icon on shapes can now be custom

Open danielsuh05 opened this issue 1 year ago • 2 comments

Fixes Issue #1828

I didn't format the option like the issue said (link.icon) because I was a bit confused by compositeReservedKeyword and some of the other things in compile.go. If you want it to be like the issue said instead of how I did it, I can look back again.

Screenshot 2024-06-01 at 16 59 35

danielsuh05 avatar Jun 01 '24 21:06 danielsuh05

So you want something like this?

x: hello {
    link: https://github.com {
        icon: https://github.com/_____.svg
    }
}

danielsuh05 avatar Jun 03 '24 01:06 danielsuh05

@danielsuh05 Yup.

Add a test for that, but also one for the flat structure

x: {
  link: https://github.com
  link.icon: https://github.com/_____.svg
}

alixander avatar Jun 05 '24 19:06 alixander