-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
934 additions
and
499 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { ReactNode } from 'react'; | ||
import { motion, AnimatePresence } from 'framer-motion'; | ||
|
||
interface NotificationBannerProps { | ||
message: ReactNode; | ||
variant?: 'info' | 'warning' | 'error'; | ||
position?: 'inline' | 'bottom'; | ||
} | ||
|
||
const NotificationBanner: React.FC<NotificationBannerProps> = ({ | ||
message, | ||
variant = 'info', | ||
position = 'inline' | ||
}) => { | ||
const variantStyles = { | ||
info: 'bg-gray-50 border-gray-200 text-gray-600', | ||
warning: 'bg-gray-50 border-gray-200 text-gray-600', | ||
error: 'bg-red-50 border-red-200 text-red-600' | ||
}; | ||
|
||
if (position === 'bottom') { | ||
return ( | ||
<motion.div | ||
className="absolute bottom-0 left-0 right-0 mx-auto px-4 mb-4 flex justify-center" | ||
initial={{ opacity: 0, y: 10 }} | ||
animate={{ opacity: 1, y: 0 }} | ||
transition={{ | ||
duration: 0.3, | ||
ease: "easeOut" | ||
}} | ||
> | ||
<motion.div | ||
className={` | ||
inline-block px-6 py-4 rounded-full border text-center | ||
${variantStyles[variant]} | ||
`} | ||
transition={{ duration: 0.2 }} | ||
> | ||
<p className="text-sm">{message}</p> | ||
</motion.div> | ||
</motion.div> | ||
); | ||
} | ||
|
||
return ( | ||
<div className={`w-full border rounded-lg p-4 ${variantStyles[variant]}`}> | ||
<p className="text-sm text-center">{message}</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export { NotificationBanner }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
frontend/src/components/layout/components/DashboardSkeleton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { motion } from 'framer-motion'; | ||
|
||
export const DashboardSkeleton = () => { | ||
return ( | ||
<div className="px-6 animate-pulse"> | ||
<div className="h-8 w-48 bg-gray-200 rounded mb-6" /> | ||
<div className="space-y-4"> | ||
<div className="h-4 w-full max-w-md mx-auto bg-gray-200 rounded" /> | ||
<div className="h-4 w-full max-w-sm mx-auto bg-gray-200 rounded" /> | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.