feat(ui,dashboard): Move InlineTip to UI package (#11462)

This commit is contained in:
Kasper Fabricius Kristensen
2025-02-17 10:16:29 +01:00
committed by GitHub
parent 63f0774569
commit b53ea77658
12 changed files with 163 additions and 72 deletions
@@ -1,8 +1,8 @@
import { Input, Switch } from "@medusajs/ui"
import { InlineTip, Input, Switch } from "@medusajs/ui"
import { ComponentType } from "react"
import { ControllerRenderProps, UseFormReturn } from "react-hook-form"
import { useTranslation } from "react-i18next"
import { Form } from "../../../components/common/form"
import { InlineTip } from "../../../components/common/inline-tip"
import { FormField } from "../../types"
import { FormFieldType } from "./types"
import { getFieldType } from "./utils"
@@ -86,6 +86,8 @@ const FormExtensionFieldComponent = ({
component,
placeholder,
}: FormExtensionFieldComponentProps) => {
const { t } = useTranslation()
if (component) {
const Component = component
@@ -104,7 +106,7 @@ const FormExtensionFieldComponent = ({
}
default: {
return (
<InlineTip variant="warning">
<InlineTip variant="warning" label={t("general.warning")}>
The field type does not support rendering a fallback component. Please
provide a component prop.
</InlineTip>