mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-26 13:08:28 +00:00
lint
This commit is contained in:
parent
bbb88a2302
commit
5c5d411588
@ -16,7 +16,16 @@ function IncButton({ children, className, ...buttonProps }) {
|
|||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export function Incrementor({ onChange, value, min = -Infinity, max = Infinity, className, ...incrementorProps }) {
|
export function Incrementor({
|
||||||
|
onChange,
|
||||||
|
value,
|
||||||
|
min = -Infinity,
|
||||||
|
max = Infinity,
|
||||||
|
className,
|
||||||
|
incrementLabel = 'next page',
|
||||||
|
decrementLabel = 'prev page',
|
||||||
|
...incrementorProps
|
||||||
|
}) {
|
||||||
value = parseInt(value);
|
value = parseInt(value);
|
||||||
value = isNaN(value) ? '' : value;
|
value = isNaN(value) ? '' : value;
|
||||||
return (
|
return (
|
||||||
@ -37,12 +46,17 @@ export function Incrementor({ onChange, value, min = -Infinity, max = Infinity,
|
|||||||
{...incrementorProps}
|
{...incrementorProps}
|
||||||
/>
|
/>
|
||||||
<div className="flex gap-1 ">
|
<div className="flex gap-1 ">
|
||||||
<IncButton disabled={value <= min} onClick={() => onChange(value - 1)}>
|
<IncButton disabled={value <= min} onClick={() => onChange(value - 1)} aria-label={decrementLabel}>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" className="w-4 h-4">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" className="w-4 h-4">
|
||||||
<path d="M3.75 7.25a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5h-8.5Z" />
|
<path d="M3.75 7.25a.75.75 0 0 0 0 1.5h8.5a.75.75 0 0 0 0-1.5h-8.5Z" />
|
||||||
</svg>
|
</svg>
|
||||||
</IncButton>
|
</IncButton>
|
||||||
<IncButton className="rounded-r-md" disabled={value >= max} onClick={() => onChange(value + 1)}>
|
<IncButton
|
||||||
|
className="rounded-r-md"
|
||||||
|
disabled={value >= max}
|
||||||
|
onClick={() => onChange(value + 1)}
|
||||||
|
aria-label={incrementLabel}
|
||||||
|
>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" className="w-4 h-4">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" className="w-4 h-4">
|
||||||
<path d="M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z" />
|
<path d="M8.75 3.75a.75.75 0 0 0-1.5 0v3.5h-3.5a.75.75 0 0 0 0 1.5h3.5v3.5a.75.75 0 0 0 1.5 0v-3.5h3.5a.75.75 0 0 0 0-1.5h-3.5v-3.5Z" />
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
@ -29,7 +29,7 @@ export function Reference() {
|
|||||||
<div className="flex h-full w-full p-2 text-foreground overflow-hidden">
|
<div className="flex h-full w-full p-2 text-foreground overflow-hidden">
|
||||||
<div className="h-full flex flex-col gap-2 w-1/3 max-w-72 ">
|
<div className="h-full flex flex-col gap-2 w-1/3 max-w-72 ">
|
||||||
<div class="w-full flex">
|
<div class="w-full flex">
|
||||||
<Textbox className='w-full' placeholder="Search" value={search} onChange={setSearch} />
|
<Textbox className="w-full" placeholder="Search" value={search} onChange={setSearch} />
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col h-full overflow-y-auto gap-1.5 bg-background bg-opacity-50 rounded-md">
|
<div className="flex flex-col h-full overflow-y-auto gap-1.5 bg-background bg-opacity-50 rounded-md">
|
||||||
{visibleFunctions.map((entry, i) => (
|
{visibleFunctions.map((entry, i) => (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user