From 42ebec89d615989a95019f7d1234a79e415bc207 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Sat, 11 Sep 2021 00:31:23 +0700 Subject: input: add options to add custom CSS class to label and input The input options for string, number, and select now have two additional options: "class_label" and "class_input". The "class_label" option will add custom CSS class to the input label. The "class_input" option will add custom CSS class to the input group. --- input/number.d.ts | 2 ++ input/number.ts | 14 ++++++++++++-- input/select.d.ts | 2 ++ input/select.ts | 13 +++++++++++-- input/string.d.ts | 2 ++ input/string.ts | 13 +++++++++++-- 6 files changed, 40 insertions(+), 6 deletions(-) diff --git a/input/number.d.ts b/input/number.d.ts index 654b7e3..217e12c 100644 --- a/input/number.d.ts +++ b/input/number.d.ts @@ -5,6 +5,8 @@ export interface WuiInputNumberOpts { hint?: string; max?: number; min?: number; + class_label?: string; + class_input?: string; is_disabled?: boolean; onChangeHandler: (new_value: number) => void; } diff --git a/input/number.ts b/input/number.ts index e2d1bc5..990d94a 100644 --- a/input/number.ts +++ b/input/number.ts @@ -5,6 +5,8 @@ export interface WuiInputNumberOpts { hint?: string max?: number min?: number + class_label?: string // Additional CSS class for label. + class_input?: string // Additional CSS class for input. is_disabled?: boolean onChangeHandler: (new_value: number) => void } @@ -24,11 +26,11 @@ const WUI_INPUT_NUMBER_CLASS_LABEL = "wui_input_number_label" // //
//
-//