mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-16 09:57:08 -04:00
feat(plugin): MoreStickers
This commit is contained in:
parent
45002e2ad7
commit
7ff4d9e818
26 changed files with 3015 additions and 2 deletions
|
@ -34,13 +34,15 @@ interface TextInputProps {
|
|||
* Otherwise, return a string containing the reason for this input being invalid
|
||||
*/
|
||||
validate(v: string): true | string;
|
||||
|
||||
placeholder?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* A very simple wrapper around Discord's TextInput that validates input and shows
|
||||
* the user an error message and only calls your onChange when the input is valid
|
||||
*/
|
||||
export function CheckedTextInput({ value: initialValue, onChange, validate }: TextInputProps) {
|
||||
export function CheckedTextInput({ value: initialValue, onChange, validate, placeholder }: TextInputProps) {
|
||||
const [value, setValue] = React.useState(initialValue);
|
||||
const [error, setError] = React.useState<string>();
|
||||
|
||||
|
@ -62,6 +64,7 @@ export function CheckedTextInput({ value: initialValue, onChange, validate }: Te
|
|||
value={value}
|
||||
onChange={handleChange}
|
||||
error={error}
|
||||
placeholder={placeholder}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue