lexical: fix minor spacing/size issues
This commit is contained in:
parent
ac591e029e
commit
e619ffffdd
|
@ -340,7 +340,7 @@ const ComposeForm = <ID extends string>({ id, shouldCondense, autoFocus, clickab
|
||||||
{(Component: any) => (
|
{(Component: any) => (
|
||||||
<Component
|
<Component
|
||||||
ref={editorStateRef}
|
ref={editorStateRef}
|
||||||
className='my-2'
|
className='mt-2'
|
||||||
composeId={id}
|
composeId={id}
|
||||||
condensed={condensed}
|
condensed={condensed}
|
||||||
eventDiscussion={!!event}
|
eventDiscussion={!!event}
|
||||||
|
|
|
@ -152,14 +152,14 @@ const ComposeEditor = React.forwardRef<string, IComposeEditor>(({
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<LexicalComposer initialConfig={initialConfig}>
|
<LexicalComposer initialConfig={initialConfig}>
|
||||||
<div className={clsx('lexical relative', className)} data-markup>
|
<div className={clsx('relative', className)} data-markup>
|
||||||
<RichTextPlugin
|
<RichTextPlugin
|
||||||
contentEditable={
|
contentEditable={
|
||||||
<div className='editor' ref={onRef} onFocus={onFocus} onPaste={handlePaste}>
|
<div ref={onRef} onFocus={onFocus} onPaste={handlePaste}>
|
||||||
<ContentEditable
|
<ContentEditable
|
||||||
className={clsx('outline-none transition-[min-height] motion-reduce:transition-none', {
|
className={clsx('outline-none transition-[min-height] motion-reduce:transition-none', {
|
||||||
'min-h-[40px]': condensed,
|
'min-h-[39px]': condensed,
|
||||||
'min-h-[100px]': !condensed,
|
'min-h-[99px]': !condensed,
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -167,7 +167,7 @@ const ComposeEditor = React.forwardRef<string, IComposeEditor>(({
|
||||||
placeholder={(
|
placeholder={(
|
||||||
<div
|
<div
|
||||||
className={clsx(
|
className={clsx(
|
||||||
'pointer-events-none absolute top-0 select-none text-gray-600 dark:placeholder:text-gray-600',
|
'pointer-events-none absolute top-0 -z-10 select-none text-[1rem] text-gray-600 dark:placeholder:text-gray-600',
|
||||||
placeholderClassName,
|
placeholderClassName,
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
|
|
@ -505,6 +505,7 @@ const AutosuggestPlugin = ({
|
||||||
(payload) => {
|
(payload) => {
|
||||||
const event = payload;
|
const event = payload;
|
||||||
if (suggestions !== null && suggestions.size && selectedSuggestion !== null) {
|
if (suggestions !== null && suggestions.size && selectedSuggestion !== null) {
|
||||||
|
// eslint-disable-next-line no-nested-ternary
|
||||||
const newSelectedSuggestion = event.shiftKey
|
const newSelectedSuggestion = event.shiftKey
|
||||||
? (selectedSuggestion !== 0 ? selectedSuggestion - 1 : suggestions.size - 1)
|
? (selectedSuggestion !== 0 ? selectedSuggestion - 1 : suggestions.size - 1)
|
||||||
: (selectedSuggestion !== suggestions.size - 1 ? selectedSuggestion + 1 : 0);
|
: (selectedSuggestion !== suggestions.size - 1 ? selectedSuggestion + 1 : 0);
|
||||||
|
|
Loading…
Reference in New Issue