1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 00:09:40 +02:00

refactor(kube/volumes): migrate to react [EE-4695] (#10987)

This commit is contained in:
Chaim Lev-Ari 2024-04-02 22:10:22 +03:00 committed by GitHub
parent 2b53bebcb3
commit da615afc92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 347 additions and 397 deletions

View file

@ -1,3 +1,6 @@
import _ from 'lodash';
import { useState } from 'react';
interface Props {
value: number;
onChange(value: number): void;
@ -5,10 +8,17 @@ interface Props {
}
export function ItemsPerPageSelector({ value, onChange, showAll }: Props) {
const [id] = useState(() => `${_.uniqueId()}-items-per-page`);
return (
<span className="limitSelector">
<span className="space-right">Items per page</span>
<label
className="space-right text-xs text-[--text-main-color] font-normal"
htmlFor={id}
>
Items per page
</label>
<select
id={id}
className="form-control"
value={value}
onChange={(e) => onChange(Number(e.target.value))}