@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
19 lines (18 loc) • 521 B
TypeScript
import { Path } from '../types';
export type Props = {
id?: string;
path?: Path;
itemPath?: Path;
};
export default function usePath(props?: Props): {
identifier: string;
path: string;
itemPath: string;
joinPath: (paths: Array<Path>) => string;
makePath: (path: Path) => string;
makeIteratePath: (itemPath?: Path, iteratePath?: Path) => string;
makeSectionPath: (path: Path) => string;
cleanPath: typeof cleanPath;
};
declare function cleanPath(path: Path): string;
export {};