Typesafe routing and CM line height issue

This commit is contained in:
Gregory Schier
2023-03-20 16:47:36 -07:00
parent d310272d19
commit dc97b91a4e
20 changed files with 202 additions and 77 deletions

View File

@@ -20,10 +20,9 @@ export type DropdownItem =
export interface DropdownProps {
children: ReactElement<HTMLAttributes<HTMLButtonElement>>;
items: DropdownItem[];
ignoreClick?: boolean;
}
export function Dropdown({ children, items, ignoreClick }: DropdownProps) {
export function Dropdown({ children, items }: DropdownProps) {
const [open, setOpen] = useState<boolean>(false);
const ref = useRef<HTMLButtonElement>(null);
const child = useMemo(() => {
@@ -36,7 +35,6 @@ export function Dropdown({ children, items, ignoreClick }: DropdownProps) {
onClick:
existingChild.props?.onClick ??
((e: MouseEvent<HTMLButtonElement>) => {
console.log('CLICK INSIDE');
e.preventDefault();
e.stopPropagation();
setOpen((o) => !o);