mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-30 07:46:15 -06:00
[feature] Create/update/remove domain permission subscriptions
This commit is contained in:
parent
8504043024
commit
a3743f8234
44 changed files with 4389 additions and 171 deletions
|
|
@ -26,6 +26,7 @@ import type {
|
|||
|
||||
import type {
|
||||
FileFormInputHook,
|
||||
NumberFormInputHook,
|
||||
RadioFormInputHook,
|
||||
TextFormInputHook,
|
||||
} from "../../lib/form/types";
|
||||
|
|
@ -57,6 +58,32 @@ export function TextInput({label, field, ...props}: TextInputProps) {
|
|||
);
|
||||
}
|
||||
|
||||
export interface NumberInputProps extends React.DetailedHTMLProps<
|
||||
React.InputHTMLAttributes<HTMLInputElement>,
|
||||
HTMLInputElement
|
||||
> {
|
||||
label?: ReactNode;
|
||||
field: NumberFormInputHook;
|
||||
}
|
||||
|
||||
export function NumberInput({label, field, ...props}: NumberInputProps) {
|
||||
const { onChange, value, ref } = field;
|
||||
|
||||
return (
|
||||
<div className={`form-field number${field.valid ? "" : " invalid"}`}>
|
||||
<label>
|
||||
{label}
|
||||
<input
|
||||
onChange={onChange}
|
||||
value={value}
|
||||
ref={ref as RefObject<HTMLInputElement>}
|
||||
{...props}
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export interface TextAreaProps extends React.DetailedHTMLProps<
|
||||
React.TextareaHTMLAttributes<HTMLTextAreaElement>,
|
||||
HTMLTextAreaElement
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue