diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/Announcement.tsx | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/components/Announcement.tsx b/src/components/Announcement.tsx new file mode 100644 index 0000000..ac7f805 --- /dev/null +++ b/src/components/Announcement.tsx @@ -0,0 +1,27 @@ +import React from "react"; + +interface AnnouncementProps { + message: string; + backgroundColor?: string; + textColor?: string; +} + +const Announcement: React.FC<AnnouncementProps> = ({ + message, + backgroundColor = "#f8d7da", + textColor = "#721c24", +}) => { + return ( + <div + className={`p-4 rounded-lg text-center font-bold`} + style={{ + backgroundColor, + color: textColor, + }} + > + {message} + </div> + ); +}; + +export default Announcement; |
