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

add popover attributes #7317

Merged
merged 6 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@

# 12.0.0-alpha.10 (Unreleased)

#### :rocket: New Feature

- Add popover attributes to JsxDOM.domProps. https://github.com/rescript-lang/rescript/pull/7317

#### :house: Internal

- Clean up legacy tags handling. https://github.com/rescript-lang/rescript/pull/7309
Expand Down
11 changes: 11 additions & 0 deletions runtime/JsxDOM.res
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@

type style = JsxDOMStyle.t
type domRef
/**
[Read more on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/popover)
*/
type popover = | @as("auto") Auto | @as("manual") Manual | @as("hint") Hint
/**
[Read more on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#popovertargetaction)
*/
type popoverTargetAction = | @as("toggle") Toggle | @as("show") Show | @as("hide") Hide

/*
This list isn't exhaustive. We'll add more as we go.
Expand Down Expand Up @@ -146,6 +154,9 @@ type domProps = {
hidden?: bool,
id?: string,
lang?: string,
popover?: popover,
popoverTarget?: string,
popoverTargetAction?: popoverTargetAction,
role?: string /* ARIA role */,
style?: style,
spellCheck?: bool,
Expand Down
Loading