SkyeYoung commented on code in PR #3014: URL: https://github.com/apache/apisix-dashboard/pull/3014#discussion_r2076642816
########## src/components/form-slice/FormPartSSL/FormItemCertKeyList.tsx: ########## @@ -0,0 +1,107 @@ +import { Button, Fieldset, Stack, type FieldsetProps } from '@mantine/core'; +import { useTranslation } from 'react-i18next'; +import { useFieldArray, useFormContext } from 'react-hook-form'; +import { FormSection } from '../FormSection'; +import type { SSLPostType } from './schema'; +import type { PropsWithChildren } from 'react'; +import { FormItemTextareaWithUpload } from '@/components/form/TextareaWithUpload'; +import IconDelete from '~icons/material-symbols/delete-forever-outline'; + +const PairWrapper = ( + props: PropsWithChildren & Pick<FieldsetProps, 'legend'> +) => { + const { children, legend } = props; + return ( + <Fieldset p={8} mb={5} legend={legend}> + <Stack flex={1} gap={1}> + {children} + </Stack> + </Fieldset> + ); +}; + +const RequiredCertKey = () => { + const { t } = useTranslation(); + const { control } = useFormContext<SSLPostType>(); + return ( + <PairWrapper> + <FormItemTextareaWithUpload + control={control} + label={`${t('form.ssls.cert')} 1`} Review Comment: I will add comments in code. tracked in #3000 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org