Skip to content

Commit 2cf01c1

Browse files
committed
fix
1 parent 0a394cf commit 2cf01c1

File tree

7 files changed

+11
-8
lines changed

7 files changed

+11
-8
lines changed

apps/www/content/docs/components/changelog.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ screens: {
5151
- remove `DragOverCursorPlugin`, `SelectionOverlayPlugin`. Use `@udecode/plate-selection` instead.
5252
- `ghost-text`: hide for xs media, add `pointer-events-none`
5353
- `floating-toolbar`: add `overflow-x-auto scrollbar-hide` to allow horizontal scrolling (mobile)
54-
- `fixed-toolbar`: add `scrollbar-hide`, update from `sticky` to `absolute`
54+
- `fixed-toolbar`: add `scrollbar-hide`
5555
- `emoji-picker-content`: add emoji font
5656
- `column-element`: add `w-full` as default
5757
- New hook: `use-is-touch-device`

apps/www/public/r/styles/default/fixed-toolbar.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"files": [
1010
{
11-
"content": "'use client';\n\nimport { withCn } from '@udecode/cn';\n\nimport { Toolbar } from './toolbar';\n\nexport const FixedToolbar = withCn(\n Toolbar,\n 'supports-backdrop-blur:bg-background/60 absolute left-0 top-0 z-50 w-full justify-between overflow-x-auto rounded-t-lg border-b border-b-border bg-background/95 p-1 backdrop-blur scrollbar-hide'\n);\n",
11+
"content": "'use client';\n\nimport { withCn } from '@udecode/cn';\n\nimport { Toolbar } from './toolbar';\n\nexport const FixedToolbar = withCn(\n Toolbar,\n 'supports-backdrop-blur:bg-background/60 sticky left-0 top-0 z-50 w-full justify-between overflow-x-auto rounded-t-lg border-b border-b-border bg-background/95 p-1 backdrop-blur scrollbar-hide'\n);\n",
1212
"path": "plate-ui/fixed-toolbar.tsx",
1313
"target": "components/plate-ui/fixed-toolbar.tsx",
1414
"type": "registry:ui"

apps/www/src/app/(blocks)/blocks/playground/page.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default function PlaygroundPage() {
1818
className={cn('themes-wrapper bg-background', block.container?.className)}
1919
>
2020
{/* <BlockWrapper block={block}> */}
21-
<PlaygroundDemo className="h-dvh" />
21+
<PlaygroundDemo className="h-dvh [&_[data-slate-editor]]:h-[calc(100dvh-37px)]" />
2222
{/* {chunks?.map((chunk, index) => (
2323
<BlockChunk
2424
key={chunk.name}

apps/www/src/components/component-installation.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,12 @@ export function ComponentInstallation({
8282
</>
8383
);
8484

85+
if (!files[0]) {
86+
console.log(files[0]);
87+
}
8588
if (codeTabs) {
8689
return (
87-
<Tabs className="relative w-full" defaultValue={files[0].name}>
90+
<Tabs className="relative w-full" defaultValue={files[0]?.name}>
8891
<TabsList className="w-full justify-start rounded-none border-b bg-transparent p-0">
8992
{files.map((file: any) => (
9093
<TabsTrigger

apps/www/src/registry/default/example/playground-demo.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export default function PlaygroundDemo({
104104
>
105105
<Editor
106106
variant="demo"
107-
className={cn(!id && 'pb-[20vh]', id && 'pb-8')}
107+
className={cn(!id && 'pb-[20vh]', id && 'h-[463px] pb-8')}
108108
spellCheck={false}
109109
/>
110110
</EditorContainer>

apps/www/src/registry/default/plate-ui/editor.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
import { cva } from 'class-variance-authority';
1515

1616
const editorContainerVariants = cva(
17-
'relative flex w-full cursor-text overflow-y-auto caret-primary selection:bg-brand/25 [&_.slate-selection-area]:border [&_.slate-selection-area]:border-brand/25 [&_.slate-selection-area]:bg-brand/15',
17+
'relative w-full cursor-text overflow-y-auto caret-primary selection:bg-brand/25 [&_.slate-selection-area]:border [&_.slate-selection-area]:border-brand/25 [&_.slate-selection-area]:bg-brand/15',
1818
{
1919
defaultVariants: {
2020
variant: 'default',
@@ -80,7 +80,7 @@ const editorVariants = cva(
8080
'max-h-[min(70vh,320px)] w-full max-w-[700px] overflow-y-auto px-3 py-2 text-sm',
8181
default:
8282
'min-h-full w-full px-16 pb-72 pt-4 text-base sm:px-[max(64px,calc(50%-350px))]',
83-
demo: 'min-h-full w-full px-16 pb-72 pt-14 text-base sm:px-[max(64px,calc(50%-350px))]',
83+
demo: 'h-[613px] w-full px-16 pb-72 pt-4 text-base sm:px-[max(64px,calc(50%-350px))]',
8484
fullWidth: 'min-h-full w-full px-16 pb-72 pt-4 text-base sm:px-24',
8585
},
8686
},

apps/www/src/registry/default/plate-ui/fixed-toolbar.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ import { Toolbar } from './toolbar';
66

77
export const FixedToolbar = withCn(
88
Toolbar,
9-
'supports-backdrop-blur:bg-background/60 absolute left-0 top-0 z-50 w-full justify-between overflow-x-auto rounded-t-lg border-b border-b-border bg-background/95 p-1 backdrop-blur scrollbar-hide'
9+
'supports-backdrop-blur:bg-background/60 sticky left-0 top-0 z-50 w-full justify-between overflow-x-auto rounded-t-lg border-b border-b-border bg-background/95 p-1 backdrop-blur scrollbar-hide'
1010
);

0 commit comments

Comments
 (0)