@etsoo/materialui 1.1.63 → 1.1.64

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.
@@ -8,9 +8,9 @@ export interface SearchBarProps {
8
8
  */
9
9
  className?: string;
10
10
  /**
11
- * Item max width
11
+ * Item width
12
12
  */
13
- itemMaxWidth?: number;
13
+ itemWidth?: number;
14
14
  /**
15
15
  * Fields
16
16
  */
package/lib/SearchBar.js CHANGED
@@ -52,7 +52,7 @@ const setChildState = (child, enabled) => {
52
52
  */
53
53
  export function SearchBar(props) {
54
54
  // Destruct
55
- const { className, fields, onSubmit, itemMaxWidth = 160 } = props;
55
+ const { className, fields, onSubmit, itemWidth = 160 } = props;
56
56
  // Labels
57
57
  const labels = Labels.CommonPage;
58
58
  // Spacing
@@ -226,10 +226,9 @@ export function SearchBar(props) {
226
226
  React.createElement(Stack, { ref: dimensions[0][0], justifyContent: "center", alignItems: "center", direction: "row", spacing: 1, width: "100%", sx: {
227
227
  overflowX: "hidden",
228
228
  "& > :not(style)": {
229
- flexBasis: "auto",
229
+ flexBasis: `${itemWidth}px`,
230
230
  flexGrow: 0,
231
231
  flexShrink: 0,
232
- maxWidth: `${itemMaxWidth}px`,
233
232
  visibility: "hidden"
234
233
  },
235
234
  "& > .hiddenChild": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.1.63",
3
+ "version": "1.1.64",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
package/src/SearchBar.tsx CHANGED
@@ -15,9 +15,9 @@ export interface SearchBarProps {
15
15
  className?: string;
16
16
 
17
17
  /**
18
- * Item max width
18
+ * Item width
19
19
  */
20
- itemMaxWidth?: number;
20
+ itemWidth?: number;
21
21
 
22
22
  /**
23
23
  * Fields
@@ -82,7 +82,7 @@ const setChildState = (child: Element, enabled: boolean) => {
82
82
  */
83
83
  export function SearchBar(props: SearchBarProps) {
84
84
  // Destruct
85
- const { className, fields, onSubmit, itemMaxWidth = 160 } = props;
85
+ const { className, fields, onSubmit, itemWidth = 160 } = props;
86
86
 
87
87
  // Labels
88
88
  const labels = Labels.CommonPage;
@@ -314,10 +314,9 @@ export function SearchBar(props: SearchBarProps) {
314
314
  sx={{
315
315
  overflowX: "hidden",
316
316
  "& > :not(style)": {
317
- flexBasis: "auto",
317
+ flexBasis: `${itemWidth}px`,
318
318
  flexGrow: 0,
319
319
  flexShrink: 0,
320
- maxWidth: `${itemMaxWidth}px`,
321
320
  visibility: "hidden"
322
321
  },
323
322
  "& > .hiddenChild": {