MCPcopy Create free account
hub / github.com/dailydotdev/apps / Alert

Function Alert

packages/shared/src/components/widgets/Alert.tsx:48–85  ·  view source on GitHub ↗
({
  className,
  title,
  children,
  type = AlertType.Info,
  flexDirection = 'flex-col',
}: AlertProps)

Source from the content-addressed store, hash-verified

46export const AlertParagraph = classed('p', 'typo-callout mt-3');
47
48function Alert({
49 className,
50 title,
51 children,
52 type = AlertType.Info,
53 flexDirection = 'flex-col',
54}: AlertProps): ReactElement {
55 const Icon = iconType[type];
56
57 return (
58 <div
59 className={classNames(
60 'flex border border-l-4 border-theme-active p-3',
61 flexDirection,
62 borderColor[type],
63 children ? 'rounded-16' : 'rounded-12',
64 className,
65 )}
66 >
67 <span className="flex flex-row items-center">
68 <Icon
69 size={IconSize.Small}
70 className={classNames('mr-2', fontColor[type])}
71 />
72 <span
73 className={classNames(
74 'flex flex-1 typo-callout',
75 !!children && 'font-bold',
76 !!children && fontColor[type],
77 )}
78 >
79 {title}
80 </span>
81 </span>
82 {children}
83 </div>
84 );
85}
86
87export default Alert;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected