mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-19 01:28:38 +02:00
refactor: capitalize comments (#7188)
* refactor: capitalize comments * revert...
This commit is contained in:
parent
200009008b
commit
fa1ce230ea
99 changed files with 241 additions and 350 deletions
|
@ -224,6 +224,8 @@ function CollapsibleBase({
|
|||
|
||||
function CollapsibleLazy({collapsed, ...props}: CollapsibleBaseProps) {
|
||||
const [mounted, setMounted] = useState(!collapsed);
|
||||
// Updated in effect so that first expansion transition can work
|
||||
const [lazyCollapsed, setLazyCollapsed] = useState(collapsed);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
if (!collapsed) {
|
||||
|
@ -231,8 +233,6 @@ function CollapsibleLazy({collapsed, ...props}: CollapsibleBaseProps) {
|
|||
}
|
||||
}, [collapsed]);
|
||||
|
||||
// lazyCollapsed updated in effect so that first expansion transition can work
|
||||
const [lazyCollapsed, setLazyCollapsed] = useState(collapsed);
|
||||
useLayoutEffect(() => {
|
||||
if (mounted) {
|
||||
setLazyCollapsed(collapsed);
|
||||
|
|
|
@ -87,7 +87,8 @@ export function Details({
|
|||
setOpen(true);
|
||||
} else {
|
||||
setCollapsed(true);
|
||||
// setOpen(false); // Don't do this, it breaks close animation!
|
||||
// Don't do this, it breaks close animation!
|
||||
// setOpen(false);
|
||||
}
|
||||
}}>
|
||||
{summary}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue