This file contains hidden or 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
import { RefObject, useEffect, useState } from "react"; | |
import ResizeObserver from "resize-observer-polyfill"; | |
type BoundingRect = Omit<DOMRectReadOnly, "toJSON">; | |
export function useResizeObserver<T extends HTMLElement>(target: RefObject<T>) | |
{ | |
const [state, setState] = useState<BoundingRect>({ bottom: 0, height: 0, left: 0, right: 0, top: 0, width: 0, x: 0, y: 0 }); |
This file contains hidden or 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
import type { GraphQLScalarTypeConfig } from "graphql"; | |
import { GraphQLScalarType } from "graphql"; | |
import { DateTimeResolver } from "graphql-scalars"; | |
import { DateTime } from "luxon"; | |
export const GraphQLDateTimeConfig: GraphQLScalarTypeConfig<DateTime, DateTime> = | |
{ | |
name: "DateTime", | |
description: "An ISO8601 date-time string represented by a Luxon DateTime instance.", |
OlderNewer