chore(meta): add prettier and config

This commit is contained in:
rektdeckard
2024-01-05 10:55:30 -07:00
committed by Tobias Fried
parent d8b3ab0279
commit 83b2a59caf
6 changed files with 20 additions and 10 deletions

View File

@@ -62,8 +62,9 @@ const Header = (_: HeaderProps) => {
Buy Me a Coffee
</a>
! It takes a lot of work to make Phosphor available to the public
free and open-source, and your one-time or recurring contribution does
a lot to keep us going. Please show us some support if you can!
free and open-source, and your one-time or recurring contribution
does a lot to keep us going. Please show us some support if you
can!
</small>
</div>
</Banner>

View File

@@ -46,8 +46,8 @@ const Tabs = ({ tabs, initialIndex = 0, onTabChange }: TabsProps) => {
activeIndex === 0
? contentStyles.activeLeft
: activeIndex === tabs.length - 1
? contentStyles.activeRight
: undefined
? contentStyles.activeRight
: undefined
}
>
{tabs[activeIndex]?.content}

View File

@@ -5,10 +5,10 @@ export type UseEventTarget = HTMLElement | SVGElement | Document | Window;
export type UseEventMap<E extends UseEventTarget> = E extends HTMLElement
? HTMLElementEventMap
: E extends SVGElement
? SVGElementEventMap
: E extends Document
? DocumentEventMap
: WindowEventMap;
? SVGElementEventMap
: E extends Document
? DocumentEventMap
: WindowEventMap;
export type UseEventType<E extends UseEventTarget> = keyof UseEventMap<E>;
@@ -27,7 +27,7 @@ export type UseEventType<E extends UseEventTarget> = keyof UseEventMap<E>;
export default function useEvent<
K extends UseEventType<T>,
M extends UseEventMap<T>,
T extends UseEventTarget = Document
T extends UseEventTarget = Document,
>(
type: K,
listener: (this: T, ev: M[K]) => any,

View File

@@ -3,7 +3,7 @@ import { useCallback, useEffect, useRef } from "react";
export type UseTimeoutFnReturn = [
isReady: () => boolean | null,
clear: () => void,
set: () => void
set: () => void,
];
export default function useTimeoutFn(