From 31c84d5479d609e66c3769193068c459d1cf37cc Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 26 Feb 2022 11:48:14 -0800 Subject: [PATCH] fix: Reuse InputSearch style for move dialog (#3173) closes #3121 --- app/scenes/DocumentMove.tsx | 94 ++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 54 deletions(-) diff --git a/app/scenes/DocumentMove.tsx b/app/scenes/DocumentMove.tsx index 8f13e48d5..e333bec13 100644 --- a/app/scenes/DocumentMove.tsx +++ b/app/scenes/DocumentMove.tsx @@ -11,6 +11,7 @@ import { DocumentPath } from "~/stores/CollectionsStore"; import Document from "~/models/Document"; import Flex from "~/components/Flex"; import { Outline } from "~/components/Input"; +import InputSearch from "~/components/InputSearch"; import Labeled from "~/components/Labeled"; import PathToDocument from "~/components/PathToDocument"; import useStores from "~/hooks/useStores"; @@ -143,69 +144,54 @@ function DocumentMove({ document, onRequestClose }: Props) {
- - - - - - - {({ width, height }: { width: number; height: number }) => ( - - data[index].id} - > - {row} - - - )} - - - + + + + {({ width, height }: { width: number; height: number }) => ( + + data[index].id} + > + {row} + + + )} + +
); } -const InputWrapper = styled("div")` - padding: 8px; - width: 100%; -`; - -const Input = styled("input")` - width: 100%; - outline: none; - background: none; - border-radius: 4px; - height: 30px; - border: 0; - color: ${(props) => props.theme.text}; - - &::placeholder { - color: ${(props) => props.theme.placeholder}; +const Input = styled(InputSearch)` + ${Outline} { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + padding: 4px 0; } `; -const NewLocation = styled(Outline)` - display: block; - flex: initial; - height: 40vh; -`; - const Results = styled.div` - padding: 8px 0; - height: calc(100% - 46px); + padding: 0; + height: 40vh; + border: 1px solid ${(props) => props.theme.inputBorder}; + border-top: 0; + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; `; const Section = styled(Flex)`