@bouko/react 2.7.0 → 2.7.1

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.
@@ -2,7 +2,7 @@ type Props<T> = {
2
2
  style?: Styles;
3
3
  placeholder?: string;
4
4
  trigger?: React.ReactNode;
5
- submit: (query: string) => Promise<T>;
5
+ submit: (query: string) => void;
6
6
  oops?: (x: string) => void;
7
7
  };
8
8
  type Styles = {
@@ -19,7 +19,7 @@ export function SearchBar({ style = {}, placeholder, trigger, submit, oops = con
19
19
  oops(err.message);
20
20
  }
21
21
  };
22
- return (_jsxs(RowBox, { style: styles.container, children: [_jsx(FadeBox, { style: "grow", gradient: "from-slate-950", children: _jsx(Input, { variant: "ghost", style: styles.input, placeholder: placeholder, value: query, update: setQuery, onEnter: search }) }), trigger && (_jsx(Button, { variant: "ghost", style: style?.trigger, action: search, children: trigger }))] }));
22
+ return (_jsxs(RowBox, { style: styles.container, children: [_jsx(FadeBox, { style: "grow", gradient: "from-slate-950", children: _jsx(Input, { variant: "ghost", style: styles.input, placeholder: placeholder, value: query, update: setQuery, onEnter: search }) }), trigger && (_jsx(Button, { variant: "ghost", style: style?.trigger, action: search, disabled: query === "", children: trigger }))] }));
23
23
  }
24
24
  const base = {
25
25
  container: "items-center gap-3 sm:gap-5 w-xl max-w-full pl-4 sm:pl-5 pr-2 sm:pr-4 py-2 sm:py-3 bg-slate-950 border border-border rounded-md",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
 
3
3
  "name": "@bouko/react",
4
- "version": "2.7.0",
4
+ "version": "2.7.1",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "license": "MIT",