Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuemark: How to add svg inside a button #277

Closed
Korab-Doroci opened this issue May 24, 2024 · 3 comments
Closed

Nuemark: How to add svg inside a button #277

Korab-Doroci opened this issue May 24, 2024 · 3 comments
Labels
bug nuemark Related to nuemark package question Further information is requested

Comments

@Korab-Doroci
Copy link

Korab-Doroci commented May 24, 2024

Describe the Bug

Using Nuemark, I can't get this example to work. The only way I found to get around it is to make the button a div, but that is not the behaviour I'm after.

This doesn't work:
[button]
[mysvg]
Learn More

This works but isn't a button:
[button]
[mysvg]
Learn More

Environment

Example:

  • OS: Arch Linux
  • Package Manager: bun 1.1.8
  • JS Runtime: bun 1.1.8
  • Nuekit Version: nue 0.5.3

Minimal Reproduction

  1. Create a new skeleton project using bun create nue
  2. Add an svg of choice inside of layout.html, and give the svg a @name="mysvg"
  3. Inside index.md, add a the code from the example that doesn't work
@nobkd nobkd added the question Further information is requested label May 24, 2024
@Korab-Doroci
Copy link
Author

I have made a small change in the nuemark code to enable svgs and other components inside of buttons now. The only limitation I found was that the components cant be inside the layout.html, needs to be in a .nue file. Is this something that is worth creating a pull request for?

@nobkd
Copy link
Collaborator

nobkd commented May 27, 2024

Sure, give it a try, maybe we even find a way to allow layout components.

(The latest merge commit has some problems test-wise with jest currently. You can test jest without it, if you do your changes after git reset --hard HEAD~1. Test commands / environment can be found here)

@nobkd nobkd added the nuemark Related to nuemark package label May 28, 2024
@nobkd
Copy link
Collaborator

nobkd commented Oct 6, 2024

Closing, see: #280 (comment)

@nobkd nobkd closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug nuemark Related to nuemark package question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants