-
-
Notifications
You must be signed in to change notification settings - Fork 529
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
feat: web components | shadow dom - tooltip support #1039
Conversation
@@ -8,7 +8,7 @@ import styles from './styles.module.css' | |||
|
|||
function App() { | |||
const [anchorId, setAnchorId] = useState('button') | |||
const [isDarkOpen, setIsDarkOpen] = useState(false) | |||
const [isDarkOpen, setIsDarkOpen] = useState(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to set the default state to open to have the access to the shadow dom element
root.appendChild(style) | ||
} | ||
} | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not able to convert the CSS modules to text, so, I had to copy our current styles and export it as string to inject inside of shadow dom
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm able to do it on: #1041
root.addEventListener(event, listener) | ||
} else { | ||
ref.current?.addEventListener(event, listener) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is on WIP, but didn't worked yet
Try to update this PR as the following gets merged: #1041 |
I tried again but I was not able to make it work as expected on shadow DOM, so, I'll close this PR and we are accepting new PRs related to this issue. Thanks All! |
closes #1029
PS: I'm first trying to make it work, after that, we can refine the solution.