From 0824a8ea3413520f5a4fea0f751b445f4b33bf5f Mon Sep 17 00:00:00 2001 From: Jonathan Summers-Muir Date: Tue, 22 Oct 2024 17:04:19 +0800 Subject: [PATCH] new components --- .../DiskManagement/InputPostTab.tsx | 21 +++++++++++++ .../DiskManagement/InputResetButton.tsx | 31 +++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 apps/studio/components/interfaces/DiskManagement/InputPostTab.tsx create mode 100644 apps/studio/components/interfaces/DiskManagement/InputResetButton.tsx diff --git a/apps/studio/components/interfaces/DiskManagement/InputPostTab.tsx b/apps/studio/components/interfaces/DiskManagement/InputPostTab.tsx new file mode 100644 index 00000000000..f8cadcab95a --- /dev/null +++ b/apps/studio/components/interfaces/DiskManagement/InputPostTab.tsx @@ -0,0 +1,21 @@ +import React, { forwardRef } from 'react' + +interface InputPostTabProps { + children: React.ReactNode + label: string +} + +export const InputPostTab = forwardRef( + ({ children, label }, ref) => { + return ( +
+ {children} +
+ {label} +
+
+ ) + } +) + +InputPostTab.displayName = 'InputPostTab' diff --git a/apps/studio/components/interfaces/DiskManagement/InputResetButton.tsx b/apps/studio/components/interfaces/DiskManagement/InputResetButton.tsx new file mode 100644 index 00000000000..dd3ed7470af --- /dev/null +++ b/apps/studio/components/interfaces/DiskManagement/InputResetButton.tsx @@ -0,0 +1,31 @@ +import { AnimatePresence, motion } from 'framer-motion' +import { Button } from 'ui' +import { RotateCcw } from 'lucide-react' + +function InputResetButton({ isDirty, onClick }: { isDirty: boolean; onClick: () => void }) { + return ( + + {isDirty && ( + + + + )} + + ) +} + +export { InputResetButton }