UNPKG

@utrecht/component-library-react

Version:

React component library bundle for the Municipality of Utrecht based on the NL Design System architecture

59 lines 1.59 kB
/** * @license EUPL-1.2 * Copyright (c) 2020-2024 Frameless B.V. * Copyright (c) 2021-2024 Gemeente Utrecht */ import { ComponentType } from 'react'; export interface IndexCharNavProps { /** * * @param char The character that was clicked. * @returns The URL to navigate to. * * @example * ```ts * const onLinkClick = (char: string) => { * return `/${char}`; * } *``` */ onLinkClick?: (char: string) => void; /** * The current char. */ currentChar?: string; /** * The characters. * @example * ```ts * const characters = [{ letter: 'A', disabled: true }, { letter: 'B', disabled: false }] * ``` */ characters: { char: string; disabled?: boolean; href?: string; }[]; /** * The component to use for the navigation. */ component?: 'link' | 'button'; /** * The custom component to use for the navigation. * @example The Nextjs Link component can be used as a custom component. * ```tsx * import Link from 'next/link'; * <IndexCharNav * component={'link'} * Link={Link} * characters={[]} * onLinkClick={(char) => console.log(char)} * /> * ``` */ Link?: ComponentType<any>; } export declare const IndexCharNav: import("react").ForwardRefExoticComponent<IndexCharNavProps & { children?: import("react").ReactNode | undefined; } & import("react").RefAttributes<HTMLButtonElement | HTMLAnchorElement>>; //# sourceMappingURL=IndexCharNav.d.ts.map