Files
sqlchat/src/components/ExecutionView/NotificationView.tsx
2023-04-29 22:49:07 +08:00

19 lines
413 B
TypeScript

interface Props {
message: string;
style: "info" | "error";
}
const NotificationView = (props: Props) => {
const { message, style } = props;
const additionalStyle = style === "error" ? "text-red-500" : "text-gray-500";
return (
<p
className={`${additionalStyle} w-full pl-4 mt-4 font-mono text-sm whitespace-pre-wrap`}
>
{message}
</p>
);
};
export default NotificationView;