diff --git a/rsconcept/frontend/src/features/library/components/PickLocation/PickLocation.tsx b/rsconcept/frontend/src/features/library/components/PickLocation/PickLocation.tsx new file mode 100644 index 00000000..4fdecada --- /dev/null +++ b/rsconcept/frontend/src/features/library/components/PickLocation/PickLocation.tsx @@ -0,0 +1,65 @@ +'use client'; + +import { type FieldError } from 'react-hook-form'; +import clsx from 'clsx'; + +import { useAuthSuspense } from '@/features/auth'; + +import { Label, TextArea } from '@/components/Input'; +import { type Styling } from '@/components/props'; + +import { LocationHead } from '../../models/library'; +import { combineLocation } from '../../models/libraryAPI'; +import { SelectLocationHead } from '../SelectLocationHead'; + +import { SelectLocationContext } from './SelectLocationContext'; + +interface PickLocationProps extends Styling { + dropdownHeight?: string; + rows?: number; + + value: string; + onChange: (newLocation: string) => void; + error?: FieldError; +} + +export function PickLocation({ + dropdownHeight, + rows = 3, + value, + onChange, + error, + className, + ...restProps +}: PickLocationProps) { + const { user } = useAuthSuspense(); + + return ( +
+
+
+ + + +