lexical: fix minor spacing/size issues

environments/review-lexical-ujdd17/deployments/4006
Alex Gleason 2023-09-22 15:38:27 -05:00
rodzic ac591e029e
commit e619ffffdd
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
3 zmienionych plików z 7 dodań i 6 usunięć

Wyświetl plik

@ -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}

Wyświetl plik

@ -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,
)}
>

Wyświetl plik

@ -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);