feat(ui-next): Adds appearance dialog with theme presets and custom theme support (#6041)
This commit is contained in:
1 parent
0fcebe05c6
commit
0dfd321326
22 files changed
+868
-3
No files matched your search
@@ -0,0 +1,38 @@
|
||||
import * as React from 'react';
|
||||
import { cn } from '../../lib/utils';
|
||||
|
||||
interface AppearanceModalProps {
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function AppearanceModal({ children, className }: AppearanceModalProps) {
|
||||
return (
|
||||
<div className={cn('flex max-h-[80vh] w-full max-w-md flex-col overflow-hidden', className)}>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
interface BodyProps {
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
}
|
||||
function Body({ children, className }: BodyProps) {
|
||||
return (
|
||||
<div className={cn('flex-1 overflow-y-auto', className)}>
|
||||
<div className="mt-1 mb-4 flex flex-col space-y-4">{children}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
interface SectionLabelProps {
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
}
|
||||
function SectionLabel({ children, className }: SectionLabelProps) {
|
||||
return <span className={cn('text-muted-foreground text-lg', className)}>{children}</span>;
|
||||
}
|
||||
|
||||
AppearanceModal.Body = Body;
|
||||
AppearanceModal.SectionLabel = SectionLabel;
|
||||
@@ -1,3 +1,4 @@
|
||||
export { UserPreferencesModal } from './UserPreferencesModal';
|
||||
export { ImageModal } from './ImageModal';
|
||||
export { AboutModal } from './AboutModal';
|
||||
export { AppearanceModal } from './AppearanceModal';
|
||||
@@ -69,7 +69,7 @@ import { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from './Tool
|
||||
import { ToolboxUI } from './OHIFToolbox';
|
||||
import Numeric from './Numeric';
|
||||
import { InputDialog, PresetDialog } from './OHIFDialogs';
|
||||
import { AboutModal, ImageModal, UserPreferencesModal } from './OHIFModals';
|
||||
import { AboutModal, ImageModal, UserPreferencesModal, AppearanceModal } from './OHIFModals';
|
||||
import Modal from './Modal/Modal';
|
||||
import { FooterAction } from './FooterAction';
|
||||
import { InputFilter } from './InputFilter';
|
||||
@@ -296,6 +296,7 @@ export {
|
||||
AboutModal,
|
||||
ImageModal,
|
||||
UserPreferencesModal,
|
||||
AppearanceModal,
|
||||
FooterAction,
|
||||
ToolSettings,
|
||||
InputFilter,
|
||||
|
||||
Reference in new issue
Block a user