@kanda-libs/ks-component-ts 0.2.477 → 0.2.478

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/app/src/App.tsx CHANGED
@@ -9,6 +9,8 @@ import {
9
9
  Label,
10
10
  SearchInput,
11
11
  ValidationItems,
12
+ Widget,
13
+ FormTheme,
12
14
  } from "@kanda-libs/ks-component-ts";
13
15
  import { StringIndexedObject } from "~/types";
14
16
  import { useEffect, useState } from "react";
@@ -25,10 +27,6 @@ const capitalise = (str: string) => str.charAt(0).toUpperCase() + str.slice(1);
25
27
  function App() {
26
28
  const form = useForm({
27
29
  mode: "onBlur",
28
- defaultValues: {
29
- range1: "100000",
30
- range2: "100000",
31
- },
32
30
  });
33
31
 
34
32
  const { watch, setValue } = form;
@@ -71,38 +69,28 @@ function App() {
71
69
 
72
70
  return (
73
71
  <div style={{ maxWidth: 500 }}>
74
- <SearchInput query={query} onSearch={setQuery} />
75
- <button
76
- onClick={() => {
77
- console.log("click");
78
- setIsLoading(!isLoading);
79
- }}
80
- className="mb-10"
81
- >
82
- change
83
- </button>
84
- <div className="px-5">
72
+ <div className="p-5">
85
73
  <Form
86
74
  id="ksts-test-form"
87
75
  form={form}
88
76
  onSubmit={onSubmit}
89
- className="flex flex-col"
77
+ className="flex flex-col p-6 bg-neutral-100"
90
78
  >
91
- <Field.RangeInput
92
- name="range1"
93
- isLoading={isLoading}
94
- min="0"
95
- max="200000"
96
- formatter={formatter}
97
- />
98
- <Field.RangeInput
99
- name="range2"
100
- isLoading={isLoading}
101
- min="0"
102
- max="200000"
103
- formatter={formatter}
79
+ <FormTheme variant="inline">
80
+ <Widget.JobCustomerPhone className="bg-neutral-000 mb-10" />
81
+ </FormTheme>
82
+ <FormTheme variant="default">
83
+ <Widget.JobCustomerPhone
84
+ className="bg-neutral-000"
85
+ name="defaultphone"
86
+ />
87
+ </FormTheme>
88
+ <Button.Text
89
+ submit
90
+ label="submit"
91
+ id="ksts-test-form-submit"
92
+ className="mt-6"
104
93
  />
105
- <Button.Text submit label="submit" id="ksts-test-form-submit" />
106
94
  </Form>
107
95
  </div>
108
96
  </div>