mirror of https://github.com/MaxLeiter/Drift
				
				
				
			more geist removal; add popover, convert more of post editing and viewing
							parent
							
								
									3c5dcc24ac
								
							
						
					
					
						commit
						4cf448c35d
					
				@ -0,0 +1,17 @@
 | 
				
			|||||||
 | 
					.actionWrapper {
 | 
				
			||||||
 | 
						position: relative;
 | 
				
			||||||
 | 
					    z-index: 1;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.actionWrapper .actions {
 | 
				
			||||||
 | 
						position: absolute;
 | 
				
			||||||
 | 
						right: 0;
 | 
				
			||||||
 | 
						top: 4px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@media (max-width: 768px) {
 | 
				
			||||||
 | 
						.actionWrapper .actions {
 | 
				
			||||||
 | 
							position: relative;
 | 
				
			||||||
 | 
							margin-left: 0 !important;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -0,0 +1,38 @@
 | 
				
			|||||||
 | 
					// largely from https://github.com/shadcn/taxonomy
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import * as React from "react"
 | 
				
			||||||
 | 
					import * as PopoverPrimitive from "@radix-ui/react-popover"
 | 
				
			||||||
 | 
					import clsx from "clsx"
 | 
				
			||||||
 | 
					import styles from './popover.module.css'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type PopoverProps = PopoverPrimitive.PopoverProps
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function Popover({ ...props }: PopoverProps) {
 | 
				
			||||||
 | 
					  return <PopoverPrimitive.Root {...props} />
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Popover.Trigger = React.forwardRef<
 | 
				
			||||||
 | 
					  HTMLButtonElement,
 | 
				
			||||||
 | 
					  PopoverPrimitive.PopoverTriggerProps
 | 
				
			||||||
 | 
					>(function PopoverTrigger({ ...props }, ref) {
 | 
				
			||||||
 | 
					  return <PopoverPrimitive.Trigger {...props} ref={ref} />
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Popover.Portal = PopoverPrimitive.Portal
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Popover.Content = React.forwardRef<
 | 
				
			||||||
 | 
					  HTMLDivElement,
 | 
				
			||||||
 | 
					  PopoverPrimitive.PopoverContentProps
 | 
				
			||||||
 | 
					>(function PopoverContent({ className, ...props }, ref) {
 | 
				
			||||||
 | 
					  return (
 | 
				
			||||||
 | 
					    <PopoverPrimitive.Content
 | 
				
			||||||
 | 
					      ref={ref}
 | 
				
			||||||
 | 
					      align="end"
 | 
				
			||||||
 | 
					      className={clsx(
 | 
				
			||||||
 | 
					       styles.root,
 | 
				
			||||||
 | 
					        className
 | 
				
			||||||
 | 
					      )}
 | 
				
			||||||
 | 
					      {...props}
 | 
				
			||||||
 | 
					    />
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
@ -0,0 +1,25 @@
 | 
				
			|||||||
 | 
					.root {
 | 
				
			||||||
 | 
						overflow: hidden;
 | 
				
			||||||
 | 
						border-radius: 0.375rem;
 | 
				
			||||||
 | 
						border: 1px solid var(--border);
 | 
				
			||||||
 | 
						background-color: var(--bg);
 | 
				
			||||||
 | 
						box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
 | 
				
			||||||
 | 
						animation: slide-in-from-top 0.1s cubic-bezier(0.4, 0, 1, 1) 0.1s;
 | 
				
			||||||
 | 
						animation-fill-mode: both;
 | 
				
			||||||
 | 
					    width: 100%;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@keyframes slide-in-from-top {
 | 
				
			||||||
 | 
					    0% {
 | 
				
			||||||
 | 
					        transform: translateY(-10px);
 | 
				
			||||||
 | 
					        opacity: 0;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    100% {
 | 
				
			||||||
 | 
					        transform: translateY(0);
 | 
				
			||||||
 | 
					        opacity: 1;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
					Loading…
					
					
				
		Reference in New Issue