@@ -11,6 +11,7 @@ import { isEnterprise } from '@/lib/billing/plan-helpers'
1111import { HEX_COLOR_REGEX } from '@/lib/branding'
1212import type { OrganizationWhitelabelSettings } from '@/lib/branding/types'
1313import { useDeploymentShape } from '@/lib/core/config/deployment-shape'
14+ import { DropZone } from '@/app/workspace/[workspaceId]/components/drop-zone'
1415import { SettingsEmptyState } from '@/app/workspace/[workspaceId]/settings/components/settings-empty-state'
1516import { SettingsPanel } from '@/app/workspace/[workspaceId]/settings/components/settings-panel'
1617import { SettingsSection } from '@/app/workspace/[workspaceId]/settings/components/settings-section/settings-section'
@@ -27,42 +28,6 @@ import { useWorkspacesQuery } from '@/hooks/queries/workspace'
2728
2829const logger = createLogger ( 'WhitelabelingSettings' )
2930
30- interface DropZoneProps {
31- onDrop : ( e : React . DragEvent ) => void
32- children : React . ReactNode
33- className ?: string
34- }
35-
36- function DropZone ( { onDrop, children, className } : DropZoneProps ) {
37- const [ isDragging , setIsDragging ] = useState ( false )
38-
39- return (
40- < div
41- className = { cn ( 'relative' , className ) }
42- onDragOver = { ( e ) => {
43- if ( e . dataTransfer . types . includes ( 'Files' ) ) {
44- e . preventDefault ( )
45- setIsDragging ( true )
46- }
47- } }
48- onDragLeave = { ( e ) => {
49- if ( ! e . currentTarget . contains ( e . relatedTarget as Node ) ) {
50- setIsDragging ( false )
51- }
52- } }
53- onDrop = { ( e ) => {
54- setIsDragging ( false )
55- onDrop ( e )
56- } }
57- >
58- { children }
59- { isDragging && (
60- < div className = 'pointer-events-none absolute inset-0 z-10 rounded-lg border-[1.5px] border-[var(--brand-accent)] border-dashed bg-[color-mix(in_srgb,var(--brand-accent)_8%,transparent)]' />
61- ) }
62- </ div >
63- )
64- }
65-
6631interface ColorInputProps {
6732 label : string
6833 value : string
0 commit comments