11import { mdiMinus , mdiMinusBox , mdiPlus , mdiPlusBox } from "@mdi/js"
22import { type JSX } from "solid-js"
3- import { ttt1 } from "~ui/i18n/ttt"
3+ import type { NumberInputText } from "~ui/input/number/NumberInputTexts"
4+ import { numberInputTextDefault } from "~ui/input/number/NumberInputTexts"
45import { Input } from "~ui/input/input/Input"
56import { buttonVariant , type ButtonVariant } from "~ui/interactive/button/buttonCva"
67import { ButtonIconOnly } from "~ui/interactive/button/ButtonIconOnly"
@@ -25,11 +26,6 @@ export type NumberInputSProps = {
2526 texts ?: NumberInputText
2627}
2728
28- type NumberInputText = {
29- decreaseByX : ( amount : number ) => string
30- increaseByX : ( amount : number ) => string
31- }
32-
3329export function NumberInputS ( p : NumberInputSProps ) {
3430 const hasMajor = p . incrDecrAmountMajor !== undefined
3531 const onChange : JSX . InputEventHandlerUnion < HTMLInputElement , InputEvent > | undefined = ( e ) => {
@@ -70,12 +66,7 @@ export function NumberInputS(p: NumberInputSProps) {
7066 }
7167 const defaultVariant = buttonVariant . ghost
7268
73- const texts =
74- p . texts ??
75- ( {
76- decreaseByX : ( amount : number ) => ttt1 ( "Decrease by [X]" , amount . toString ( ) ) ,
77- increaseByX : ( amount : number ) => ttt1 ( "Increase by [X]" , amount . toString ( ) ) ,
78- } as const satisfies NumberInputText )
69+ const texts = p . texts ?? numberInputTextDefault
7970
8071 return (
8172 < div class = { classMerge ( "flex flex-row flex-nowrap items-center" , p . class ) } >
0 commit comments