@theguild/components 9.7.0 → 9.7.1-alpha-20250407134425-851c3b04fe4e1c62733fbc6e570e20ec0b340127
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../../cn";
|
|
3
3
|
import { InputShake } from "./input-shake";
|
|
4
|
-
function Input({ severity, message, ...props }) {
|
|
4
|
+
function Input({ severity = "neutral", message, ...props }) {
|
|
5
5
|
return /* @__PURE__ */ jsxs(
|
|
6
6
|
"div",
|
|
7
7
|
{
|
|
@@ -34,9 +34,10 @@ function Input({ severity, message, ...props }) {
|
|
|
34
34
|
"overflow-hidden rounded-b-lg pl-4 pr-1 text-sm transition-all *:animate-in *:fade-in",
|
|
35
35
|
severity === "critical" && "bg-critical-dark/10 dark:bg-critical-bright/20",
|
|
36
36
|
severity === "warning" && "bg-warning-bright/10",
|
|
37
|
-
severity === "positive" && "bg-positive-dark/10"
|
|
37
|
+
severity === "positive" && "bg-positive-dark/10",
|
|
38
|
+
severity === "neutral" && "bg-blue-100 dark:bg-neutral-800"
|
|
38
39
|
),
|
|
39
|
-
children: message && (severity === "critical" ? /* @__PURE__ */ jsx("p", { className: "py-0.5 text-sm text-critical-dark dark:text-white", children: message }) : severity === "warning" ? /* @__PURE__ */ jsx("p", { className: "py-0.5 text-sm text-warning-bright", children: message }) : /* @__PURE__ */ jsx("p", { className: "py-0.5 text-sm text-positive-dark", children: message }))
|
|
40
|
+
children: message && (severity === "critical" ? /* @__PURE__ */ jsx("p", { className: "py-0.5 text-sm text-critical-dark dark:text-white", children: message }) : severity === "warning" ? /* @__PURE__ */ jsx("p", { className: "py-0.5 text-sm text-warning-bright", children: message }) : severity === "positive" ? /* @__PURE__ */ jsx("p", { className: "py-0.5 text-sm text-positive-dark", children: message }) : /* @__PURE__ */ jsx("p", { className: "py-0.5 text-sm text-green-800", children: message }))
|
|
40
41
|
}
|
|
41
42
|
)
|
|
42
43
|
]
|
package/package.json
CHANGED