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

Method renderChild

packages/omi-templates/src/components/sidebar.tsx:118–134  ·  view source on GitHub ↗
(child: SidebarItem)

Source from the content-addressed store, hash-verified

116 }
117
118 renderChild(child: SidebarItem) {
119 return (
120 <li
121 onClick={() => this.select(child)}
122 class={classNames(
123 'py-1 h-9 indent-10 rounded hover:bg-accent flex items-center text-sm text-zinc-500 dark:text-zinc-200 cursor-pointer',
124 {
125 'bg-accent': this.state.active === child.value,
126 },
127 )}
128 >
129 <a href="javascript:void()" class="flex items-center space-x-2 whitespace-nowrap">
130 <span>{child.text}</span>
131 </a>
132 </li>
133 )
134 }
135
136 renderToolTipChild(child: SidebarItem) {
137 return (

Callers 1

renderMethod · 0.95

Calls 2

selectMethod · 0.95
classNamesFunction · 0.90

Tested by

no test coverage detected