Add mention support
Allow vertical resizing of inputs
This commit is contained in:
@ -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}
|
||||
|
Reference in New Issue
Block a user