Skip to content

Commit

Permalink
space-popover-items
Browse files Browse the repository at this point in the history
  • Loading branch information
alexburner committed Nov 20, 2022
1 parent 8d634d1 commit 649a615
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 33 deletions.
42 changes: 10 additions & 32 deletions src/components/SpaceControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ const SpaceDisplay = ({ space }: { space: Space }): JSX.Element => {
}

const POPOVER_PADDING = '20px'
const FIELD_FONT_SIZE = '16px'

const SpacePopover = ({
children,
Expand All @@ -85,38 +84,17 @@ const SpacePopover = ({
<PopoverWrapper>
<PopoverTrigger setOpen={setOpen}>{children}</PopoverTrigger>
<Popover isOpen={isOpen} setClose={setClose}>
<div
style={{
display: 'flex',
flexDirection: 'column',
height: '100%',
}}
>
<div style={{ padding: POPOVER_PADDING }}>
{/* <div style={{ margin: '12px 0 0', textAlign: 'center' }}>
<SearchForLocation setLocalSpace={setLocalSpace} />
</div> */}
<div style={{ margin: '12px 0 0', textAlign: 'center' }}>
<UseCurrentLocation setLocalSpace={setLocalSpace} />
</div>
<div style={{ margin: '12px 0 0', textAlign: 'center' }}>
<LatLongFields
localSpace={localSpace}
setLocalSpace={setLocalSpace}
/>
</div>
<div className="space-popover-items">
<div className="p-5">
<UseCurrentLocation setLocalSpace={setLocalSpace} />
</div>
<div className="p-3">
<LatLongFields
localSpace={localSpace}
setLocalSpace={setLocalSpace}
/>
</div>
{/* Popover Footer */}
<div
style={{
padding: POPOVER_PADDING,
height: '74px',
borderTop: '1px solid #E8E8E8',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
}}
>
<div className="p-2">
{/* Save/Cancel */}
<div style={{ textAlign: 'center' }}>
<FormButton
Expand Down
2 changes: 1 addition & 1 deletion src/components/SpaceControls/UseCurrentLocation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const UseCurrentLocation = ({
const [loading, setLoading] = useState(false)
return (
<button
className="button"
className="button is-info is-light is-large"
disabled={loading}
onClick={() => {
setLoading(true)
Expand Down
6 changes: 6 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,9 @@ tr td:first-child {
tr td:last-child {
text-align: left;
}

/* Space Popover */

.space-popover-items > div:not(:last-child) {
border-bottom: 1px solid #e8e8e8;
}

0 comments on commit 649a615

Please sign in to comment.