Skip to content

Commit

Permalink
fix(react-ui-lib): editor focus outline
Browse files Browse the repository at this point in the history
  • Loading branch information
matej21 committed Jul 1, 2024
1 parent 312baab commit eb64181
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/react-ui-lib/src/editor/common/editor-canvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export const EditorCanvas = memo(<P extends HTMLTextAreaDivTargetProps>({
}: EditorCanvasProps<P>) => {

return (
<div data-focus-ring={dataAttribute(focusRing)} className={'relative w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50'}>
<Component className="focus-visible:ring-0" {...props} />
<div data-focus-ring={dataAttribute(focusRing)} className={'relative w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-within:outline-none focus-within:ring-1 focus-within:ring-ring disabled:cursor-not-allowed disabled:opacity-50'}>
<Component className="outline-none" {...props} />
{children}
</div>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface EditorEditableCanvasProps extends EditableProps {

}

export const EditorEditableCanvas = ({ className, ...editableProps }: EditorEditableCanvasProps) => {
export const EditorEditableCanvas = (editableProps: EditorEditableCanvasProps) => {
const editor = useSlate()
const pathRef = useRef<Path | undefined>(undefined)

Expand Down

0 comments on commit eb64181

Please sign in to comment.