DiskManagementRestartRequiredSection.tsx 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import { AnimatePresence, motion } from 'framer-motion'
  2. import { RotateCcw } from 'lucide-react'
  3. import { DialogSection, WarningIcon } from 'ui'
  4. interface DiskMangementRestartRequiredSectionProps {
  5. visible: boolean
  6. title: string
  7. description: string
  8. }
  9. export const DiskMangementRestartRequiredSection = ({
  10. visible,
  11. title,
  12. description,
  13. }: DiskMangementRestartRequiredSectionProps) => {
  14. return (
  15. <AnimatePresence>
  16. {visible && (
  17. <motion.div
  18. initial={{ opacity: 1, height: 'auto' }}
  19. exit={{ opacity: 0, height: 0 }}
  20. transition={{ duration: 0.15 }}
  21. className="w-full"
  22. >
  23. <DialogSection className="bg-surface-100 text-sm text-foreground-light flex items-center gap-4 relative w-full rounded-md border-spacing-0 border">
  24. <div className="w-12 h-12">
  25. <div className="relative w-10 h-10 m-1 bg-alternative text-foreground border rounded-full flex items-center justify-center">
  26. <RotateCcw strokeWidth={1} />
  27. <WarningIcon className="absolute -right-1.5 -top-1.5" />
  28. </div>
  29. </div>
  30. <div className="flex flex-col gap-0 grow">
  31. <p className="text-sm text-foreground">{title}</p>
  32. <p className="text-sm text-foreground-light">{description}</p>
  33. </div>
  34. </DialogSection>
  35. </motion.div>
  36. )}
  37. </AnimatePresence>
  38. )
  39. }