@kanda-libs/ks-component-ts 0.2.256 → 0.2.258

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
@@ -1,7 +1,14 @@
1
1
  window.global ||= window;
2
2
  import "@kanda-libs/ks-component-ts/dist/library.css";
3
3
  import "@kanda-libs/ks-design-library/dist/library.css";
4
- import { useForm, Field, Form } from "@kanda-libs/ks-component-ts";
4
+ import {
5
+ useForm,
6
+ Field,
7
+ Form,
8
+ OptionalHiddenField,
9
+ Label,
10
+ SearchInput,
11
+ } from "@kanda-libs/ks-component-ts";
5
12
  import { StringIndexedObject } from "~/types";
6
13
  import { useState } from "react";
7
14
 
@@ -16,25 +23,15 @@ const capitalise = (str: string) => str.charAt(0).toUpperCase() + str.slice(1);
16
23
  function App() {
17
24
  const form = useForm({
18
25
  defaultValues: {
19
- pct: undefined,
26
+ pct: 10,
20
27
  },
21
28
  });
22
29
  const [query, setQuery] = useState("");
23
30
 
24
31
  return (
25
- <Form form={form} onSubmit={() => {}}>
26
- <Field.NumberInput
27
- label="Rent or mortgage"
28
- name="pct"
29
- {...{
30
- type: "price",
31
- placeholder: "£0.00",
32
- icon: "pound",
33
- iconVariant: "dark",
34
- symbol: "",
35
- }}
36
- />
37
- </Form>
32
+ <div style={{ maxWidth: 500 }}>
33
+ <SearchInput query={query} onSearch={setQuery} />
34
+ </div>
38
35
  );
39
36
  }
40
37