MCPcopy Create free account
hub / github.com/cesanta/mongoose / Setting

Function Setting

tutorials/http/device-dashboard/web_root/components.js:227–236  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

225};
226
227export function Setting(props) {
228 let input = TextValue;
229 if (props.type == 'switch') input = SwitchValue;
230 if (props.type == 'select') input = SelectValue;
231 return html`
232<div class=${props.cls || 'grid grid-cols-2 gap-2 my-1'}>
233 <label class="flex items-center text-sm text-gray-700 mr-2 font-medium ${props.title || 'hidden'}">${props.title}<//>
234 <div class="flex items-center">${h(input, props)}<//>
235<//>`;
236};
237
238export function Pagination({ totalItems, itemsPerPage, currentPage, setPageFn, colors }) {
239 const totalPages = Math.ceil(totalItems / itemsPerPage);

Callers

nothing calls this directly

Calls 1

hFunction · 0.90

Tested by

no test coverage detected