summaryrefslogtreecommitdiff
path: root/vendor/bundle/ruby/3.4.0/gems/rouge-4.7.0/lib/rouge/demos/gts
blob: 9ea0c2705aade5a9bea5726fd97d121a4f8d93da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import type { TOC } from '@ember/component/template-only';
import { LinkTo } from '@ember/routing';
import { local } from 'embroider-css-modules';

import styles from './navigation-menu.css';

type MenuItem = {
  label: string;
  route: string;
};

interface NavigationMenuSignature {
  Args: {
    menuItems: MenuItem[];
    name?: string;
  };
}

const NavigationMenu = <template>
  <nav aria-label={{@name}} data-test-nav={{@name}}>
    <ul class={{styles.list}}>
      {{#each @menuItems as |menuItem|}}
        <li>
          <LinkTo
            class={{local styles "link"}}
            data-test-link={{menuItem.label}}
          >
            {{menuItem.label}}
          </LinkTo>
        </li>
      {{/each}}
    </ul>
  </nav>
</template> satisfies TOC<NavigationMenuSignature>;

export default NavigationMenu;