@bouko/react 0.1.3 → 0.1.4

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.
@@ -0,0 +1,6 @@
1
+ import type { Field as FieldProps } from "../core/types";
2
+ type Props = FieldProps & {
3
+ placeholder?: string;
4
+ };
5
+ export default function Input({ style, label, required, note, update, ...props }: Props): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import Field from "./field";
3
+ export default function Input({ style, label, required = true, note, update, ...props }) {
4
+ return (_jsx(Field, { style: style, label: label, required: required, note: note, children: _jsx("input", { className: "px-3 py-2 bg-slate-200/50 border border-slate-300 outline-blue-500 rounded text-sm", onChange: ({ target: { value } }) => update(value), ...props }) }));
5
+ }
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export { default as Button } from "./components/button";
2
+ export { default as Input } from "./components/input";
2
3
  export { default as MultipleChoice } from "./components/mcq";
3
4
  export * from "./core/types";
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export { default as Button } from "./components/button";
2
+ export { default as Input } from "./components/input";
2
3
  export { default as MultipleChoice } from "./components/mcq";
3
4
  export * from "./core/types";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
 
3
3
  "name": "@bouko/react",
4
- "version": "0.1.3",
4
+ "version": "0.1.4",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "license": "MIT",