UNPKG

@amsterdam/design-system-react

Version:

All React components from the Amsterdam Design System. Use it to compose pages in your website or application.

14 lines (13 loc) 304 B
export function getHeadingTag(level) { switch (level) { case 2: return 'h2'; case 3: return 'h3'; case 4: return 'h4'; // Ensure valid HTML with invalid input outside of TypeScript. default: return 'h1'; } }