MCPcopy
hub / github.com/Tencent/omi / render

Method render

packages/omi-templates/src/components/docs-sidebar.tsx:64–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62 }
63
64 render() {
65 return (
66 <nav class="text-base lg:text-sm">
67 <ul role="list" class="space-y-9">
68 {this.props.items.map((item) => {
69 return (
70 <li>
71 <h2 class="font-display font-medium text-zinc-900 dark:text-white">{item.text}</h2>
72 <ul
73 role="list"
74 class="mt-2 space-y-2 border-l-2 border-zinc-100 lg:mt-4 lg:space-y-4 lg:border-zinc-200 dark:border-zinc-700"
75 >
76 {item.children.map((child) => {
77 return (
78 <li class="relative">
79 <a
80 class={classNames(theme.base, {
81 [theme.active]: this.state.active === child.value,
82 [theme.unactive]: this.state.active !== child.value,
83 })}
84 onClick={(evt: MouseEvent) => this.onClick(child, evt)}
85 href="javascript:void(0)"
86 >
87 {child.text}
88 </a>
89 </li>
90 )
91 })}
92 </ul>
93 </li>
94 )
95 })}
96 </ul>
97 </nav>
98 )
99 }
100}

Callers

nothing calls this directly

Calls 3

onClickMethod · 0.95
classNamesFunction · 0.90
mapMethod · 0.80

Tested by

no test coverage detected