-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
729 additions
and
801 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,3 +51,7 @@ | |
--ring: 240 4.9% 83.9%; | ||
} | ||
} | ||
|
||
:focus-visible { | ||
outline: 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
packages/playground/admin/lib-extra/legacy-editor/BlockToolbar.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { memo, ReactNode } from 'react' | ||
import { useSlateSelection } from 'slate-react' | ||
import { cn } from '../../lib/utils/cn' | ||
|
||
export interface HoveringToolbarsProps { | ||
children: ReactNode | ||
} | ||
|
||
export const BlockToolbar = memo(({ children }: HoveringToolbarsProps) => { | ||
const selection = useSlateSelection() | ||
|
||
return ( | ||
<div className="static" contentEditable={false}> | ||
<div className={cn('-mx-3 -my-2 p-2 rounded-b-md border-t bg-gray-50 space-x-2', !selection && 'pointer-events-none opacity-50')}>{children}</div> | ||
</div> | ||
) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
packages/playground/admin/lib-extra/legacy-editor/HoveringToolbar.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.