mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 00:56:26 +08:00
feat(core): sub-page for setting panel (#11678)
**setting panel sub-page impl, with cascading pages support.**
## Usage
```tsx
// inside setting content
const island = useSubPageIsland();
const [open, setOpen] = useState(false);
if (!island) {
return null;
}
return (
<SubPageProvider
island={island}
open={open}
onClose={() => setOpen(false)}
backText="Back"
/>
);
```
### Preview

This commit is contained in:
@@ -269,6 +269,13 @@ export const AFFINE_FLAGS = {
|
||||
configurable: isCanaryBuild,
|
||||
defaultState: isCanaryBuild,
|
||||
},
|
||||
enable_setting_subpage_animation: {
|
||||
category: 'affine',
|
||||
displayName: 'Enable Setting Subpage Animation',
|
||||
description: 'Apply animation for setting subpage open/close',
|
||||
configurable: isCanaryBuild,
|
||||
defaultState: false,
|
||||
},
|
||||
} satisfies { [key in string]: FlagInfo };
|
||||
|
||||
// oxlint-disable-next-line no-redeclare
|
||||
|
||||
Reference in New Issue
Block a user