mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-07 22:27:11 +02:00
fix: unbreak Details component (#5364)
This commit is contained in:
parent
7b807fd85c
commit
ce92f30d33
1 changed files with 35 additions and 40 deletions
|
@ -50,11 +50,7 @@ const Details = ({summary, children, ...props}: DetailsProps): JSX.Element => {
|
||||||
styles.details,
|
styles.details,
|
||||||
{[styles.isBrowser]: isBrowser},
|
{[styles.isBrowser]: isBrowser},
|
||||||
props.className,
|
props.className,
|
||||||
)}>
|
)}
|
||||||
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}
|
|
||||||
<div
|
|
||||||
role="button"
|
|
||||||
tabIndex={0}
|
|
||||||
onMouseDown={(e) => {
|
onMouseDown={(e) => {
|
||||||
const target = e.target as HTMLElement;
|
const target = e.target as HTMLElement;
|
||||||
// Prevent a double-click to highlight summary text
|
// Prevent a double-click to highlight summary text
|
||||||
|
@ -91,7 +87,6 @@ const Details = ({summary, children, ...props}: DetailsProps): JSX.Element => {
|
||||||
}}>
|
}}>
|
||||||
<div className={styles.collapsibleContent}>{children}</div>
|
<div className={styles.collapsibleContent}>{children}</div>
|
||||||
</Collapsible>
|
</Collapsible>
|
||||||
</div>
|
|
||||||
</details>
|
</details>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue