MCPcopy Create free account
hub / github.com/continuedev/continue / Alert

Function Alert

gui/src/components/gui/Alert.tsx:69–102  ·  view source on GitHub ↗
({
  type = "info",
  size = "lg",
  className,
  children,
  ...props
}: AlertProps)

Source from the content-addressed store, hash-verified

67};
68
69function Alert({
70 type = "info",
71 size = "lg",
72 className,
73 children,
74 ...props
75}: AlertProps) {
76 const { Icon, border, text, iconColor } = ALERT_CONFIGS[type];
77
78 const colorMap = {
79 info: varWithFallback("info"),
80 success: varWithFallback("success"),
81 warning: varWithFallback("warning"),
82 error: varWithFallback("error"),
83 };
84
85 return (
86 <div
87 className={cn(
88 `flex flex-row items-start border-[0.5px] ${border} border-solid shadow-sm ${alertSizes[size]}`,
89 className,
90 )}
91 style={{
92 backgroundColor: `color-mix(in srgb, ${colorMap[type]} 20%, transparent)`,
93 }}
94 {...props}
95 >
96 <Icon className={`flex-shrink-0 ${iconColor} ${iconSizes[size]}`} />
97 <div className="flex flex-1 flex-col">
98 <div className={`${spacingSizes[size]} ${text}`}>{children}</div>
99 </div>
100 </div>
101 );
102}
103
104export default Alert;

Callers

nothing calls this directly

Calls 2

varWithFallbackFunction · 0.90
cnFunction · 0.90

Tested by

no test coverage detected