prettier
This commit is contained in:
parent
47f65da621
commit
f47f5c1344
9 changed files with 41 additions and 35 deletions
|
|
@ -36,12 +36,17 @@ export function Incrementor({ onChange, value, min = -Infinity, max = Infinity,
|
|||
className="w-32 my-0 border-none rounded-r-none bg-transparent appearance-none [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none"
|
||||
/>
|
||||
<div className="flex gap-1 ">
|
||||
<IncButton label={'increment'} disabled={value <= min} onClick={() => onChange(value - 1)}>
|
||||
<IncButton label={'increment'} disabled={value <= min} onClick={() => onChange(value - 1)}>
|
||||
<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" />
|
||||
</svg>
|
||||
</IncButton>
|
||||
<IncButton label={'decrement'} className="rounded-r-md" disabled={value >= max} onClick={() => onChange(value + 1)}>
|
||||
<IncButton
|
||||
label={'decrement'}
|
||||
className="rounded-r-md"
|
||||
disabled={value >= max}
|
||||
onClick={() => onChange(value + 1)}
|
||||
>
|
||||
<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" />
|
||||
</svg>
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ function PatternPageWithPagination({ patterns, patternOnClick, context, paginati
|
|||
);
|
||||
}
|
||||
|
||||
let featuredPageNum = 1
|
||||
let featuredPageNum = 1;
|
||||
function FeaturedPatterns({ context }) {
|
||||
const examplePatterns = useExamplePatterns();
|
||||
const collections = examplePatterns.collections;
|
||||
|
|
@ -215,13 +215,13 @@ function FeaturedPatterns({ context }) {
|
|||
}}
|
||||
paginationOnChange={async (pageNum) => {
|
||||
await loadAndSetFeaturedPatterns(pageNum);
|
||||
featuredPageNum = pageNum
|
||||
featuredPageNum = pageNum;
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
let latestPageNum = 1
|
||||
let latestPageNum = 1;
|
||||
function LatestPatterns({ context }) {
|
||||
const examplePatterns = useExamplePatterns();
|
||||
const collections = examplePatterns.collections;
|
||||
|
|
@ -236,7 +236,7 @@ function LatestPatterns({ context }) {
|
|||
}}
|
||||
paginationOnChange={async (pageNum) => {
|
||||
await loadAndSetPublicPatterns(pageNum);
|
||||
latestPageNum = pageNum
|
||||
latestPageNum = pageNum;
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ export function Reference() {
|
|||
<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 class="w-full flex">
|
||||
<Textbox placeholder="Search" value={search} onChange={setSearch}/>
|
||||
<Textbox placeholder="Search" value={search} onChange={setSearch} />
|
||||
</div>
|
||||
<div className="flex flex-col h-full overflow-y-auto gap-1.5 bg-background bg-opacity-50 rounded-md">
|
||||
{visibleFunctions.map((entry, i) => (
|
||||
|
|
|
|||
|
|
@ -54,11 +54,7 @@ export function SoundsTab() {
|
|||
|
||||
return (
|
||||
<div id="sounds-tab" className="px-4 flex flex-col w-full h-full dark:text-white text-stone-900">
|
||||
<Textbox
|
||||
placeholder="Search"
|
||||
value={search}
|
||||
onChange={(v) => setSearch(v)}
|
||||
/>
|
||||
<Textbox placeholder="Search" value={search} onChange={(v) => setSearch(v)} />
|
||||
|
||||
<div className="pb-2 flex shrink-0 flex-wrap">
|
||||
<ButtonGroup
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { $featuredPatterns, $publicPatterns, patternFilterName } from '../user_pattern_utils.mjs';
|
||||
import { $featuredPatterns, $publicPatterns, patternFilterName } from '../user_pattern_utils.mjs';
|
||||
import { useStore } from '@nanostores/react';
|
||||
import { useMemo } from 'react';
|
||||
import * as tunes from '../repl/tunes.mjs';
|
||||
|
|
|
|||
|
|
@ -199,4 +199,3 @@ export function setVersionDefaultsFrom(code) {
|
|||
console.error(err);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue