Skip to content

Commit

Permalink
Fix Poll Node (#5579)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivailop7 authored Feb 4, 2024
1 parent 9df9883 commit f9f1184
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 53 deletions.
53 changes: 53 additions & 0 deletions packages/lexical-playground/src/nodes/InlineImageNode.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,56 @@
display: inline-block;
pointer-events: none;
}

.InlineImageNode_Checkbox:checked,
.InlineImageNode_Checkbox:not(:checked) {
position: absolute;
left: -9999px;
}

.InlineImageNode_Checkbox:checked + label,
.InlineImageNode_Checkbox:not(:checked) + label {
position: absolute;
padding-right: 55px;
cursor: pointer;
line-height: 20px;
display: inline-block;
color: #666;
}

.InlineImageNode_Checkbox:checked + label:before,
.InlineImageNode_Checkbox:not(:checked) + label:before {
content: '';
position: absolute;
right: 0;
top: 0;
width: 18px;
height: 18px;
border: 1px solid #666;
background: #fff;
}

.InlineImageNode_Checkbox:checked + label:after,
.InlineImageNode_Checkbox:not(:checked) + label:after {
content: '';
width: 8px;
height: 8px;
background: #222222;
position: absolute;
top: 6px;
right: 6px;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
}

.InlineImageNode_Checkbox:not(:checked) + label:after {
opacity: 0;
-webkit-transform: scale(0);
transform: scale(0);
}

.InlineImageNode_Checkbox:checked + label:after {
opacity: 1;
-webkit-transform: scale(1);
transform: scale(1);
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
import type {Position} from '../../nodes/InlineImageNode';

import '../../ui/Checkbox.css';
import '../../nodes/InlineImageNode.css';

import {useLexicalComposerContext} from '@lexical/react/LexicalComposerContext';
import {$wrapNodeInElement, mergeRegister} from '@lexical/utils';
Expand Down Expand Up @@ -141,6 +141,7 @@ export function InsertInlineImageDialog({
<div className="Input__wrapper">
<input
id="caption"
className="InlineImageNode_Checkbox"
type="checkbox"
checked={showCaption}
onChange={handleShowCaptionChange}
Expand Down
52 changes: 0 additions & 52 deletions packages/lexical-playground/src/ui/Checkbox.css

This file was deleted.

0 comments on commit f9f1184

Please sign in to comment.