Time to remove this auto-shrink text effect in composer

It was fun…
This commit is contained in:
Lim Chee Aun 2023-10-24 23:23:51 +08:00
parent 576dcf7701
commit 05ee27e045
2 changed files with 4 additions and 4 deletions

View file

@ -56,8 +56,8 @@
@media (min-width: 40em) { @media (min-width: 40em) {
#compose-container textarea { #compose-container textarea {
font-size: 150%; /* font-size: 150%;
font-size: calc(100% + 50% / var(--text-weight)); font-size: calc(100% + 50% / var(--text-weight)); */
max-height: 65vh; max-height: 65vh;
} }
} }

View file

@ -1210,7 +1210,7 @@ const Textarea = forwardRef((props, ref) => {
const [text, setText] = useState(ref.current?.value || ''); const [text, setText] = useState(ref.current?.value || '');
const { maxCharacters, performSearch = () => {}, ...textareaProps } = props; const { maxCharacters, performSearch = () => {}, ...textareaProps } = props;
const snapStates = useSnapshot(states); const snapStates = useSnapshot(states);
const charCount = snapStates.composerCharacterCount; // const charCount = snapStates.composerCharacterCount;
const customEmojis = useRef(); const customEmojis = useRef();
useEffect(() => { useEffect(() => {
@ -1442,7 +1442,7 @@ const Textarea = forwardRef((props, ref) => {
style={{ style={{
width: '100%', width: '100%',
height: '4em', height: '4em',
'--text-weight': (1 + charCount / 140).toFixed(1) || 1, // '--text-weight': (1 + charCount / 140).toFixed(1) || 1,
}} }}
/> />
</text-expander> </text-expander>