diff --git a/website/src/repl/components/incrementor/Incrementor.jsx b/website/src/repl/components/incrementor/Incrementor.jsx index 9103894d..f03a98da 100644 --- a/website/src/repl/components/incrementor/Incrementor.jsx +++ b/website/src/repl/components/incrementor/Incrementor.jsx @@ -1,26 +1,26 @@ -import { cn } from 'tailwind_utils.mjs'; import { Textbox } from '../textbox/Textbox'; +import cx from '@src/cx.mjs'; -function IncButton({ children, label, className, ...buttonProps }) { +function IncButton({ children, className, ...buttonProps }) { return ( ); } -export function Incrementor({ onChange, value, min = -Infinity, max = Infinity, className }) { +export function Incrementor({ onChange, value, min = -Infinity, max = Infinity, className, ...incrementorProps }) { value = parseInt(value); value = isNaN(value) ? '' : value; return ( -
rounded-md', className)}> +
rounded-md', className)}>
- onChange(value - 1)}> + onChange(value - 1)}> - = max} - onClick={() => onChange(value + 1)} - > + = max} onClick={() => onChange(value + 1)}> diff --git a/website/src/repl/components/pagination/Pagination.jsx b/website/src/repl/components/pagination/Pagination.jsx index 8df761dc..c3ea6dd4 100644 --- a/website/src/repl/components/pagination/Pagination.jsx +++ b/website/src/repl/components/pagination/Pagination.jsx @@ -1,5 +1,5 @@ import { Incrementor } from '../incrementor/Incrementor'; -export function Pagination({ currPage, onPageChange, className }) { - return ; +export function Pagination({ currPage, onPageChange, className, ...incrementorProps }) { + return ; } diff --git a/website/src/repl/components/panel/PatternsTab.jsx b/website/src/repl/components/panel/PatternsTab.jsx index 3fc247b8..21449444 100644 --- a/website/src/repl/components/panel/PatternsTab.jsx +++ b/website/src/repl/components/panel/PatternsTab.jsx @@ -17,7 +17,7 @@ import { settingsMap, useSettings } from '../../../settings.mjs'; import { Pagination } from '../pagination/Pagination.jsx'; import { useState } from 'react'; import { useDebounce } from '../usedebounce.jsx'; -import { cn } from 'tailwind_utils.mjs'; +import cx from '@src/cx.mjs'; export function PatternLabel({ pattern } /* : { pattern: Tables<'code'> } */) { const meta = useMemo(() => getMetadata(pattern.code), [pattern]); @@ -43,7 +43,7 @@ export function PatternLabel({ pattern } /* : { pattern: Tables<'code'> } */) { function PatternButton({ showOutline, onClick, pattern, showHiglight }) { return (
- +
{visibleFunctions.map((entry, i) => ( diff --git a/website/src/repl/components/textbox/Textbox.jsx b/website/src/repl/components/textbox/Textbox.jsx index 7b97afed..f391dd6d 100644 --- a/website/src/repl/components/textbox/Textbox.jsx +++ b/website/src/repl/components/textbox/Textbox.jsx @@ -1,9 +1,9 @@ -import { cn } from 'tailwind_utils.mjs'; +import cx from '@src/cx.mjs'; export function Textbox({ onChange, className, ...inputProps }) { return ( onChange(e.target.value)} {...inputProps} /> diff --git a/website/tailwind_utils.mjs b/website/tailwind_utils.mjs deleted file mode 100644 index 4ec963f4..00000000 --- a/website/tailwind_utils.mjs +++ /dev/null @@ -1,4 +0,0 @@ -// utility for combining class names -export function cn(...classes) { - return classes.filter(Boolean).join(' '); -}