diff --git a/packages/docs/docs/components/dockview.mdx b/packages/docs/docs/components/dockview.mdx index df42e4e06..40f020fb0 100644 --- a/packages/docs/docs/components/dockview.mdx +++ b/packages/docs/docs/components/dockview.mdx @@ -7,7 +7,7 @@ import { MultiFrameworkContainer } from '@site/src/components/ui/container'; import Link from '@docusaurus/Link'; import useBaseUrl from '@docusaurus/useBaseUrl'; -import DockviewPersistance from '@site/sandboxes/layout-dockview/src/app'; +import DockviewPersistence from '@site/sandboxes/layout-dockview/src/app'; import SimpleDockview from '@site/sandboxes/simple-dockview/src/app'; import ResizeDockview from '@site/sandboxes/resize-dockview/src/app'; import DockviewWatermark from '@site/sandboxes/watermark-dockview/src/app'; @@ -140,7 +140,7 @@ As well as importing the `dockview` stylesheet you must provide a class-based th You can find more details on theming here. -## Layout Persistance +## Layout Persistence Layouts are loaded and saved via to `fromJSON` and `toJSON` methods on the Dockview api. The api also exposes an event `onDidLayoutChange` you can listen on to determine when the layout has changed. @@ -156,7 +156,7 @@ React.useEffect(() => { const layout = api.toJSON(); localStorage.setItem( - 'dockview_persistance_layout', + 'dockview_persistence_layout', JSON.stringify(layout) ); }); @@ -169,7 +169,7 @@ React.useEffect(() => { ```tsx title="Loading a layout from localStorage" const onReady = (event: DockviewReadyEvent) => { - const layoutString = localStorage.getItem('dockview_persistance_layout'); + const layoutString = localStorage.getItem('dockview_persistence_layout'); let success = false; @@ -194,7 +194,7 @@ If you refresh the page you should notice your layout is loaded as you left it. ## Scrollbars diff --git a/packages/docs/sandboxes/floatinggroup-dockview/src/app.tsx b/packages/docs/sandboxes/floatinggroup-dockview/src/app.tsx index 990913d2e..e3c066bbd 100644 --- a/packages/docs/sandboxes/floatinggroup-dockview/src/app.tsx +++ b/packages/docs/sandboxes/floatinggroup-dockview/src/app.tsx @@ -127,7 +127,7 @@ const useLocalStorage = ( ]; }; -export const DockviewPersistance = (props: { theme?: string }) => { +export const DockviewPersistence = (props: { theme?: string }) => { const [api, setApi] = React.useState(); const [layout, setLayout] = useLocalStorage('floating.layout'); @@ -289,7 +289,7 @@ const RightComponent = (props: IDockviewHeaderActionsProps) => { ); }; -export default DockviewPersistance; +export default DockviewPersistence; const Watermark = () => { return
watermark
; diff --git a/packages/docs/sandboxes/layout-dockview/src/app.tsx b/packages/docs/sandboxes/layout-dockview/src/app.tsx index 740202840..85d76bd39 100644 --- a/packages/docs/sandboxes/layout-dockview/src/app.tsx +++ b/packages/docs/sandboxes/layout-dockview/src/app.tsx @@ -47,11 +47,11 @@ function loadDefaultLayout(api: DockviewApi) { }); } -export const DockviewPersistance = (props: { theme?: string }) => { +export const DockviewPersistence = (props: { theme?: string }) => { const [api, setApi] = React.useState(); const clearLayout = () => { - localStorage.removeItem('dockview_persistance_layout'); + localStorage.removeItem('dockview_persistence_layout'); if (api) { api.clear(); loadDefaultLayout(api); @@ -60,7 +60,7 @@ export const DockviewPersistance = (props: { theme?: string }) => { const onReady = (event: DockviewReadyEvent) => { const layoutString = localStorage.getItem( - 'dockview_persistance_layout' + 'dockview_persistence_layout' ); let success = false; @@ -91,7 +91,7 @@ export const DockviewPersistance = (props: { theme?: string }) => { const layout = api.toJSON(); localStorage.setItem( - 'dockview_persistance_layout', + 'dockview_persistence_layout', JSON.stringify(layout) ); }); @@ -125,7 +125,7 @@ export const DockviewPersistance = (props: { theme?: string }) => { ); }; -export default DockviewPersistance; +export default DockviewPersistence; const Watermark = () => { return
watermark
; diff --git a/packages/docs/versioned_docs/version-1.9.2/components/dockview.mdx b/packages/docs/versioned_docs/version-1.9.2/components/dockview.mdx index df42e4e06..40f020fb0 100644 --- a/packages/docs/versioned_docs/version-1.9.2/components/dockview.mdx +++ b/packages/docs/versioned_docs/version-1.9.2/components/dockview.mdx @@ -7,7 +7,7 @@ import { MultiFrameworkContainer } from '@site/src/components/ui/container'; import Link from '@docusaurus/Link'; import useBaseUrl from '@docusaurus/useBaseUrl'; -import DockviewPersistance from '@site/sandboxes/layout-dockview/src/app'; +import DockviewPersistence from '@site/sandboxes/layout-dockview/src/app'; import SimpleDockview from '@site/sandboxes/simple-dockview/src/app'; import ResizeDockview from '@site/sandboxes/resize-dockview/src/app'; import DockviewWatermark from '@site/sandboxes/watermark-dockview/src/app'; @@ -140,7 +140,7 @@ As well as importing the `dockview` stylesheet you must provide a class-based th You can find more details on theming here. -## Layout Persistance +## Layout Persistence Layouts are loaded and saved via to `fromJSON` and `toJSON` methods on the Dockview api. The api also exposes an event `onDidLayoutChange` you can listen on to determine when the layout has changed. @@ -156,7 +156,7 @@ React.useEffect(() => { const layout = api.toJSON(); localStorage.setItem( - 'dockview_persistance_layout', + 'dockview_persistence_layout', JSON.stringify(layout) ); }); @@ -169,7 +169,7 @@ React.useEffect(() => { ```tsx title="Loading a layout from localStorage" const onReady = (event: DockviewReadyEvent) => { - const layoutString = localStorage.getItem('dockview_persistance_layout'); + const layoutString = localStorage.getItem('dockview_persistence_layout'); let success = false; @@ -194,7 +194,7 @@ If you refresh the page you should notice your layout is loaded as you left it. ## Scrollbars