mirror of
https://github.com/gethomepage/homepage.git
synced 2026-02-08 00:40:52 +08:00
Fix headless-ui DOM warning
This commit is contained in:
@@ -22,9 +22,7 @@ vi.mock("@headlessui/react", async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const DisclosurePanel = React.forwardRef(function DisclosurePanel(props, ref) {
|
const DisclosurePanel = React.forwardRef(function DisclosurePanel(props, ref) {
|
||||||
// HeadlessUI uses a boolean `static` prop; avoid forwarding it to the DOM.
|
return <div ref={ref} data-testid="disclosure-panel" {...props} static="true" />;
|
||||||
const { static: isStatic, ...rest } = props; // eslint-disable-line no-unused-vars
|
|
||||||
return <div ref={ref} data-testid="disclosure-panel" {...rest} />;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Disclosure.Button = DisclosureButton;
|
Disclosure.Button = DisclosureButton;
|
||||||
|
|||||||
Reference in New Issue
Block a user