| 225 | }; |
| 226 | |
| 227 | export 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 | |
| 238 | export function Pagination({ totalItems, itemsPerPage, currentPage, setPageFn, colors }) { |
| 239 | const totalPages = Math.ceil(totalItems / itemsPerPage); |