()
| 133 | } |
| 134 | } |
| 135 | render() { |
| 136 | return ( |
| 137 | <nav class="container mx-auto flex flex-wrap items-center"> |
| 138 | <div class="block md:hidden"> |
| 139 | <button |
| 140 | onClick={this.onClick} |
| 141 | data-collapse-toggle="navbar-multi-level" |
| 142 | type="button" |
| 143 | class="inline-flex items-center p-2 w-10 h-10 justify-center text-sm text-zinc-500 rounded-lg md:hidden hover:bg-zinc-100 focus:outline-none focus:ring-2 focus:ring-zinc-200 dark:text-zinc-400 dark:hover:bg-zinc-700 dark:focus:ring-zinc-600" |
| 144 | aria-controls="navbar-multi-level" |
| 145 | aria-expanded="false" |
| 146 | > |
| 147 | {this.state.isOpen ? ( |
| 148 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 149 | <path |
| 150 | fill="none" |
| 151 | stroke="currentColor" |
| 152 | stroke-linecap="round" |
| 153 | stroke-width="2" |
| 154 | d="M12 12L19 19M12 12L5 5M12 12L5 19M12 12L19 5" |
| 155 | ></path> |
| 156 | </svg> |
| 157 | ) : ( |
| 158 | <svg |
| 159 | class="w-5 h-5" |
| 160 | aria-hidden="true" |
| 161 | xmlns="http://www.w3.org/2000/svg" |
| 162 | fill="none" |
| 163 | viewBox="0 0 17 14" |
| 164 | > |
| 165 | <path |
| 166 | stroke="currentColor" |
| 167 | stroke-linecap="round" |
| 168 | stroke-linejoin="round" |
| 169 | stroke-width="2" |
| 170 | d="M1 1h15M1 7h15M1 13h15" |
| 171 | /> |
| 172 | </svg> |
| 173 | )} |
| 174 | </button> |
| 175 | </div> |
| 176 | <div |
| 177 | class={classNames( |
| 178 | 'max-h-[calc(100vh-50px)] overflow-auto md:overflow-visible w-full left-0 fixed top-14 pt-6 pb-14 md:pt-0 md:pb-0 whitespace-nowrap bg-[#fafafa] md:bg-transparent text-center md:w-auto md:flex-grow dark:bg-background md:dark:bg-transparent md:flex md:items-center md:static text-foreground', |
| 179 | { |
| 180 | hidden: !this.state.isOpen, |
| 181 | }, |
| 182 | )} |
| 183 | > |
| 184 | <ul class="w-[288px] mx-auto md:w-full md:flex md:flex-row text-left"> |
| 185 | {this.props.items.map((navbarItem: NavbarItem) => { |
| 186 | if (navbarItem.tag) { |
| 187 | return ( |
| 188 | <li class="md:relative md:mr-2 p-1 border-b md:border-none group md:rounded-md"> |
| 189 | <navbarItem.tag></navbarItem.tag> |
| 190 | </li> |
| 191 | ) |
| 192 | } |
nothing calls this directly
no test coverage detected