diff --git a/frontend/src/components/v2/FormControl/FormControl.tsx b/frontend/src/components/v2/FormControl/FormControl.tsx index 2493cdb54..91dfd4139 100644 --- a/frontend/src/components/v2/FormControl/FormControl.tsx +++ b/frontend/src/components/v2/FormControl/FormControl.tsx @@ -8,12 +8,17 @@ export type FormLabelProps = { id?: string; isRequired?: boolean; label?: ReactNode; + icon?: ReactNode; }; -export const FormLabel = ({ id, label, isRequired }: FormLabelProps) => ( - +export const FormLabel = ({ id, label, isRequired, icon }: FormLabelProps) => ( + {label} {isRequired && *} + {icon && {icon}} ); @@ -47,6 +52,7 @@ export type FormControlProps = { errorText?: ReactNode; children: JSX.Element; className?: string; + icon?: ReactNode; }; export const FormControl = ({ @@ -57,12 +63,13 @@ export const FormControl = ({ errorText, id, isError, + icon, className }: FormControlProps): JSX.Element => { return (
{typeof label === "string" ? ( - + ) : ( label )} diff --git a/frontend/src/components/v2/Tooltip/Tooltip.tsx b/frontend/src/components/v2/Tooltip/Tooltip.tsx index f6f697f38..9d1285aa0 100644 --- a/frontend/src/components/v2/Tooltip/Tooltip.tsx +++ b/frontend/src/components/v2/Tooltip/Tooltip.tsx @@ -10,6 +10,7 @@ export type TooltipProps = Omit void; defaultOpen?: boolean; + position?: "top" | "bottom" | "left" | "right"; }; export const Tooltip = ({ @@ -20,6 +21,7 @@ export const Tooltip = ({ defaultOpen, className, asChild = true, + position = "top", ...props }: TooltipProps) => ( {children} ({ resolver: yupResolver(formSchema) }); + const [showTip, setShowTip] = useState(false); useEffect(() => { if (!isOpen) { @@ -85,11 +89,49 @@ export const AddWebhookForm = ({ /> +

Here are some examples of glob patterns:

+
+
  • + / - Matches all files and + directories in the current directory +
  • +
  • + **/* - Matches all files and + directories in the current directory and its subdirectories +
  • +
  • + {"/{dir1,dir2}"} - Matches all files + and directories in dir1 and dir2 +
  • +
    +
    + } + position="right" + className="text-xs" + > +
    setShowTip(true)} + > + +
    + + } isRequired isError={Boolean(errors?.secretPath)} errorText={errors?.secretPath?.message} + helperText="Glob patterns are used to match multiple files or directories" > - +