import { useMediaQuery } from '@mantine/hooks'; import { VscSymbolConstant, VscSymbolMethod, VscSymbolProperty } from 'react-icons/vsc'; import { MethodList } from './MethodList'; import { ParameterTable } from './ParameterTable'; import { PropertyList } from './PropertyList'; import { Section } from './Section'; import type { DocInterface } from '~/DocModel/DocInterface'; import type { ParameterDocumentation } from '~/util/parse.server'; export function PropertiesSection({ data }: { data: ReturnType['properties'] }) { const matches = useMediaQuery('(max-width: 768px)', true, { getInitialValueInEffect: false }); return data.length ? (
} padded dense={matches}>
) : null; } export function MethodsSection({ data }: { data: ReturnType['methods'] }) { const matches = useMediaQuery('(max-width: 768px)', true, { getInitialValueInEffect: false }); return data.length ? (
} padded dense={matches}>
) : null; } export function ParametersSection({ data }: { data: ParameterDocumentation[] }) { const matches = useMediaQuery('(max-width: 768px)', true, { getInitialValueInEffect: false }); return data.length ? (
} padded dense={matches}>
) : null; }