fix: unbreak Details component (#5364)

This commit is contained in:
Alexey Pyltsyn 2021-08-17 13:04:32 +03:00 committed by GitHub
parent 7b807fd85c
commit ce92f30d33
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,11 +50,7 @@ const Details = ({summary, children, ...props}: DetailsProps): JSX.Element => {
styles.details,
{[styles.isBrowser]: isBrowser},
props.className,
)}>
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}
<div
role="button"
tabIndex={0}
)}
onMouseDown={(e) => {
const target = e.target as HTMLElement;
// 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>
</Collapsible>
</div>
</details>
);
};