gitscope
← marzneshin / v0.7.1 / dashboard/src/modules/hosts/dialogs/mutation/fields/splithttp/padding-bytes.tsx
https://dev.kronoz.win/r/marzneshin.git
dashboard/src/modules/hosts/dialogs/mutation/fields/splithttp/padding-bytes.tsx · TypeScript
Blame Raw
 1import {
 2    FormControl,
 3    FormField,
 4    FormItem,
 5    FormLabel,
 6    Input,
 7} from "@marzneshin/common/components";
 8import { useTranslation } from "react-i18next";
 9
10
11export const SplitHttpPaddingBytesField = (
12    { updater }: { updater: (field: string, value: any) => void }
13) => {
14    const { t } = useTranslation();
15    return (
16        <FormField
17            name="splithttp_settings.padding_bytes"
18            render={({ field }) => (
19                <FormItem>
20                    <FormLabel>
21                        {t("Padding Bytes")}
22                    </FormLabel>
23                    <FormControl>
24                        <Input
25                            value={field.value}
26                            onChange={(e) =>
27                                updater(
28                                    "splithttp_settings.padding_bytes",
29                                    e.target.value
30                                )
31                            }
32                            className="w-full"
33                        />
34                    </FormControl>
35                </FormItem>
36            )}
37        />
38    )
39}