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
|
||||
ref={editorStateRef}
|
||||
className='my-2'
|
||||
className='mt-2'
|
||||
composeId={id}
|
||||
condensed={condensed}
|
||||
eventDiscussion={!!event}
|
||||
|
|
|
@ -152,14 +152,14 @@ const ComposeEditor = React.forwardRef<string, IComposeEditor>(({
|
|||
|
||||
return (
|
||||
<LexicalComposer initialConfig={initialConfig}>
|
||||
<div className={clsx('lexical relative', className)} data-markup>
|
||||
<div className={clsx('relative', className)} data-markup>
|
||||
<RichTextPlugin
|
||||
contentEditable={
|
||||
<div className='editor' ref={onRef} onFocus={onFocus} onPaste={handlePaste}>
|
||||
<div ref={onRef} onFocus={onFocus} onPaste={handlePaste}>
|
||||
<ContentEditable
|
||||
className={clsx('outline-none transition-[min-height] motion-reduce:transition-none', {
|
||||
'min-h-[40px]': condensed,
|
||||
'min-h-[100px]': !condensed,
|
||||
'min-h-[39px]': condensed,
|
||||
'min-h-[99px]': !condensed,
|
||||
})}
|
||||
/>
|
||||
</div>
|
||||
|
@ -167,7 +167,7 @@ const ComposeEditor = React.forwardRef<string, IComposeEditor>(({
|
|||
placeholder={(
|
||||
<div
|
||||
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,
|
||||
)}
|
||||
>
|
||||
|
|
|
@ -505,6 +505,7 @@ const AutosuggestPlugin = ({
|
|||
(payload) => {
|
||||
const event = payload;
|
||||
if (suggestions !== null && suggestions.size && selectedSuggestion !== null) {
|
||||
// eslint-disable-next-line no-nested-ternary
|
||||
const newSelectedSuggestion = event.shiftKey
|
||||
? (selectedSuggestion !== 0 ? selectedSuggestion - 1 : suggestions.size - 1)
|
||||
: (selectedSuggestion !== suggestions.size - 1 ? selectedSuggestion + 1 : 0);
|
||||
|
|
Loading…
Reference in New Issue