Add mention support

Allow vertical resizing of inputs
This commit is contained in:
jude
2024-03-03 21:44:35 +00:00
parent 66135ecd08
commit 329492b244
11 changed files with 219 additions and 78 deletions

View File

@ -1,5 +1,7 @@
import { ImagePicker } from "../ImagePicker";
import { Reminder } from "../../../api";
import { useMentions } from "../../App/useMentions";
import { useRef } from "preact/hooks";
type Props = {
name: string;
@ -8,6 +10,9 @@ type Props = {
};
export const Author = ({ name, icon, setReminder }: Props) => {
const input = useRef(null);
useMentions(input);
return (
<div class="embed-author-box">
<div class="a">
@ -34,6 +39,7 @@ export const Author = ({ name, icon, setReminder }: Props) => {
class="discord-embed-author message-input autoresize"
placeholder="Embed Author..."
rows={1}
ref={input}
maxlength={256}
name="embed_author"
value={name}