-
-
+
-
-
-
- {withStickers ? (
-
-
+
+ {!large ? emojiButtonFragment : null}
+
+
+ {!large ? (
+ <>
+ {stickerButtonFragment}
+ {!dirty ? micButtonFragment : null}
+ {attButtonFragment}
+ >
+ ) : null}
+
+ {large ? (
+
+ {emojiButtonFragment}
+ {stickerButtonFragment}
+ {attButtonFragment}
+ {!dirty ? micButtonFragment : null}
+ {dirty || !showMic ? sendButtonFragment : null}
+
) : null}
);
diff --git a/ts/components/CompositionInput.tsx b/ts/components/CompositionInput.tsx
index a52487267..aadb6e6f5 100644
--- a/ts/components/CompositionInput.tsx
+++ b/ts/components/CompositionInput.tsx
@@ -34,6 +34,7 @@ const colonsRegex = /(?:^|\s):[a-z0-9-_+]+:?/gi;
export type Props = {
readonly i18n: LocalizerType;
readonly disabled?: boolean;
+ readonly large?: boolean;
readonly editorRef?: React.RefObject
;
readonly inputApi?: React.MutableRefObject;
readonly skinTone?: EmojiPickDataType['skinTone'];
@@ -144,6 +145,7 @@ const combineRefs = createSelector(
export const CompositionInput = ({
i18n,
disabled,
+ large,
editorRef,
inputApi,
onDirtyChange,
@@ -531,6 +533,10 @@ export const CompositionInput = ({
}
if (e.key === 'Enter' && !e.shiftKey) {
+ if (large && !(e.ctrlKey || e.metaKey)) {
+ return getDefaultKeyBinding(e);
+ }
+
e.preventDefault();
return 'submit';
@@ -562,7 +568,7 @@ export const CompositionInput = ({
return getDefaultKeyBinding(e);
},
- [emojiResults]
+ [emojiResults, large]
);
// Create popper root
@@ -647,7 +653,14 @@ export const CompositionInput = ({
className="module-composition-input__input"
ref={combineRefs(popperRef, measureRef, rootElRef)}
>
-
+
unknown;
readonly showPickerHint: boolean;
readonly clearShowPickerHint: () => unknown;
+ readonly position?: 'top-end' | 'top-start';
};
export type Props = OwnProps;
@@ -44,6 +45,7 @@ export const StickerButton = React.memo(
clearShowIntroduction,
showPickerHint,
clearShowPickerHint,
+ position = 'top-end',
}: Props) => {
const [open, setOpen] = React.useState(false);
const [popperRoot, setPopperRoot] = React.useState(
@@ -188,7 +190,7 @@ export const StickerButton = React.memo(
)}
{!open && !showIntroduction && installedPack ? (
-
+
{({ ref, style, placement, arrowProps }) => (
) : null}
{!open && showIntroduction ? (
-
+
{({ ref, style, placement, arrowProps }) => (