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

HtmlElement.Custom #104

Closed
Freymaurer opened this issue Apr 1, 2022 · 4 comments
Closed

HtmlElement.Custom #104

Freymaurer opened this issue Apr 1, 2022 · 4 comments

Comments

@Freymaurer
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Hello, i am trying to use lit web-components in fornax and one problem i have is, that i cannot use custom html tags in fornax.

So i would really like to have a custom option in this discriminate union type.

Describe the solution you'd like

type HtmlElement =
        private
        | Custom of tagName: string * props: HtmlProperties list * children: HtmlElement list
// ...
and helper level tag =
    match tag with
    | Custom (name, props, children) -> format name props children level
module Html =
        let custom (tagName:string) (props : HtmlProperties list) (children: HtmlElement list) = HtmlElement.Custom(tagName, props,children)

Describe alternatives you've considered
I could propably use some js to replace an placeholder element with my custom html tag element, but thats seems not like a clean solution to me.

Additional context
What i want my Html to look like in the end:
image

@Freymaurer
Copy link
Contributor Author

As i would like to have this option rather sooner than later, please tell me if i can help somehow. If you want i can implement it and do a PR. 😃

@Freymaurer
Copy link
Contributor Author

Hey i just went ahead and added the above implementation with unit tests. Would be nice if the PR would be looked into as soon as possible, as i need this for production.

@Freymaurer
Copy link
Contributor Author

Hey i really don't want to be that guy, but can you guys give me at least some info. Is the PR fine? Will you implement it? If so, when will this be live?

@baronfel
Copy link
Contributor

Merged, need to consider a release next I suppose. Thanks for poking!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants