-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #67 from Vizzuality/client/feature/globe-pin-color
Change globe pin and other style adjustments
- Loading branch information
Showing
13 changed files
with
301 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
const GradientLine = () => <div className="bg-header-line my-4 h-[1px]"></div>; | ||
const GradientLine = () => <div className="bg-header-line relative my-4 h-[1px]"></div>; | ||
|
||
export default GradientLine; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
'use client'; | ||
|
||
import * as React from 'react'; | ||
|
||
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area'; | ||
|
||
import { cn } from '@/lib/classnames'; | ||
|
||
const ScrollArea = React.forwardRef< | ||
React.ElementRef<typeof ScrollAreaPrimitive.Root>, | ||
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> | ||
>(({ className, children, ...props }, ref) => ( | ||
<ScrollAreaPrimitive.Root | ||
ref={ref} | ||
className={cn('relative overflow-hidden', className)} | ||
{...props} | ||
> | ||
<ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit]"> | ||
{children} | ||
</ScrollAreaPrimitive.Viewport> | ||
<ScrollBar /> | ||
<ScrollAreaPrimitive.Corner /> | ||
</ScrollAreaPrimitive.Root> | ||
)); | ||
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName; | ||
|
||
const ScrollBar = React.forwardRef< | ||
React.ElementRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>, | ||
React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.ScrollAreaScrollbar> | ||
>(({ className, orientation = 'vertical', ...props }, ref) => ( | ||
<ScrollAreaPrimitive.ScrollAreaScrollbar | ||
ref={ref} | ||
orientation={orientation} | ||
className={cn( | ||
'flex touch-none select-none transition-colors', | ||
orientation === 'vertical' && 'h-full w-2 border-l border-l-transparent p-[1px]', | ||
orientation === 'horizontal' && 'h-2.5 flex-col border-t border-t-transparent p-[1px]', | ||
className | ||
)} | ||
{...props} | ||
> | ||
<ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-gray-800" /> | ||
</ScrollAreaPrimitive.ScrollAreaScrollbar> | ||
)); | ||
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName; | ||
|
||
export { ScrollArea, ScrollBar }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
client/src/containers/story/steps/layouts/components/map-content.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { PropsWithChildren } from 'react'; | ||
|
||
import { ChevronDownIcon } from 'lucide-react'; | ||
|
||
import { cn } from '@/lib/classnames'; | ||
|
||
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible'; | ||
|
||
type MapContentProps = PropsWithChildren & { | ||
showContent?: boolean; | ||
title?: string; | ||
titlePlaceholder?: string; | ||
}; | ||
|
||
const MapContent = ({ showContent, title, titlePlaceholder, children }: MapContentProps) => { | ||
return ( | ||
<Collapsible | ||
defaultOpen | ||
className={cn( | ||
'group pointer-events-auto w-[404px] overflow-hidden rounded border border-gray-800 bg-[#335e6f] bg-opacity-50 p-2 backdrop-blur transition-all duration-300 ease-in-out', | ||
showContent ? 'opacity-100' : 'opacity-0' | ||
)} | ||
> | ||
<CollapsibleTrigger className="group flex w-full justify-between gap-2 px-6 data-[state=open]:pt-2"> | ||
<h2 className="font-notes group w-[calc(100%-32px)] flex-1 text-start text-xl font-bold"> | ||
{title ? ( | ||
title | ||
) : ( | ||
<span className="block w-full truncate group-data-[state=open]:hidden"> | ||
{titlePlaceholder} | ||
</span> | ||
)} | ||
</h2> | ||
<ChevronDownIcon className="h-6 w-6 shrink-0 group-data-[state=open]:rotate-180" /> | ||
</CollapsibleTrigger> | ||
<CollapsibleContent> | ||
<div className={cn('w-full space-y-2 px-6 pb-6', title && ' pt-2')}> | ||
<div className="font-open-sans space-y-4 text-sm">{children}</div> | ||
</div> | ||
</CollapsibleContent> | ||
</Collapsible> | ||
); | ||
}; | ||
|
||
export default MapContent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.