Skip to content

Commit

Permalink
fix(ChatComposer): fix Lexical global styles (#2854)
Browse files Browse the repository at this point in the history
  • Loading branch information
jb-twilio committed Dec 1, 2022
1 parent 026bf7f commit 4ebab8b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/chilly-lizards-dress.md
@@ -0,0 +1,6 @@
---
'@twilio-paste/core': patch
'@twilio-paste/chat-composer': patch
---

[ChatComposer]: fix Lexical global styles
Expand Up @@ -28,9 +28,10 @@ import {
*/
HistoryPlugin,
} from '@twilio-paste/lexical-library';
import {StylingGlobals} from '@twilio-paste/styling-library';
import type {LexicalComposerProps, OnChangeFunction, ContentEditableProps} from '@twilio-paste/lexical-library';

import './styles.css';
import {chatComposerLexicalStyles} from './styles';
import {AutoLinkPlugin} from './AutoLinkPlugin';
import {PlaceholderWrapper} from './PlaceholderWrapper';
import {baseConfig, renderInitialText} from './helpers';
Expand Down Expand Up @@ -97,6 +98,7 @@ export const ChatComposer = React.forwardRef<HTMLDivElement, ChatComposerProps>(
overflowY="scroll"
maxHeight={maxHeight}
>
<StylingGlobals styles={chatComposerLexicalStyles} />
<LexicalComposer initialConfig={merge(baseConfigWithEditorState, config)}>
<>
<RichTextPlugin
Expand Down
@@ -1,3 +1,6 @@
import {EmotionCSS} from '@twilio-paste/styling-library';

export const chatComposerLexicalStyles = EmotionCSS`
.paste-chat-composer-paragraph {
margin: 0;
position: relative;
Expand All @@ -6,3 +9,4 @@
.paste-chat-composer-content-editable:focus {
outline: none;
}
`;

0 comments on commit 4ebab8b

Please sign in to comment.