UNPKG

@amsterdam/design-system-react

Version:

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

18 lines (17 loc) 366 B
/** * @license EUPL-1.2+ * Copyright Gemeente Amsterdam */ 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'; } }