MCPcopy Create free account
hub / github.com/code-forge-io/react-router-devtools / getVariantStyles

Function getVariantStyles

docs/app/ui/alert.tsx:15–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13export const Alert = ({ children, title, variant, className = "" }: AlertProps) => {
14 const { t } = useTranslation()
15 const getVariantStyles = () => {
16 switch (variant) {
17 case "info":
18 return {
19 container: "bg-[var(--color-info-bg)] border-[var(--color-info-border)] border-l-4",
20 title: "text-[var(--color-info-text)]",
21 content: "text-[var(--color-info-text)]",
22 icon: "text-[var(--color-info-icon)]",
23 }
24 case "warning":
25 return {
26 container: "bg-[var(--color-warning-bg)] border-[var(--color-warning-border)] border-l-4",
27 title: "text-[var(--color-warning-text)]",
28 content: "text-[var(--color-warning-text)]",
29 icon: "text-[var(--color-warning-icon)]",
30 }
31 default:
32 return {
33 container: "",
34 title: "",
35 content: "",
36 icon: "",
37 }
38 }
39 }
40
41 const getIcon = () => {
42 switch (variant) {

Callers 1

AlertFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…