@onewelcome/react-lib-components 1.8.1 → 1.8.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "homepage": "http://onewelcome.github.io/react-lib-components",
3
3
  "name": "@onewelcome/react-lib-components",
4
- "version": "1.8.1",
4
+ "version": "1.8.3",
5
5
  "license": "Apache-2.0",
6
6
  "author": "OneWelcome B.V.",
7
7
  "main": "dist/index.js",
@@ -20,7 +20,7 @@
20
20
  border: var(--button-border-width) var(--button-border-style) transparent;
21
21
  background-color: transparent;
22
22
  padding: 0;
23
- border-radius: 50%;
23
+ border-radius: var(--button-border-radius);
24
24
  display: flex;
25
25
  align-items: center;
26
26
  justify-content: center;
@@ -93,7 +93,10 @@ const CheckboxComponent: ForwardRefRenderFunction<HTMLInputElement, Props> = (
93
93
  );
94
94
  }
95
95
 
96
- if (typeof children === "string") {
96
+ if (
97
+ typeof children === "string" ||
98
+ (typeof children === "object" && (children as ReactElement).type === "span")
99
+ ) {
97
100
  return children;
98
101
  }
99
102
 
@@ -205,20 +205,20 @@ const FileUploadComponent: ForwardRefRenderFunction<HTMLInputElement, Props> = (
205
205
  <div className={classes["file-upload-btn"]}>
206
206
  <Button variant="outline" disabled={disabled}>
207
207
  {selectButtonText}
208
+ <input
209
+ className={classes["upload-input"]}
210
+ {...rest}
211
+ ref={ref}
212
+ aria-labelledby={labeledBy}
213
+ type="file"
214
+ name={name}
215
+ {...(multiple && { multiple: true })}
216
+ disabled={disabled}
217
+ accept={accept}
218
+ onChange={onInputChange}
219
+ spellCheck={rest.spellCheck || false}
220
+ />
208
221
  </Button>
209
- <input
210
- className={classes["upload-input"]}
211
- {...rest}
212
- ref={ref}
213
- aria-labelledby={labeledBy}
214
- type="file"
215
- name={name}
216
- {...(multiple && { multiple: true })}
217
- disabled={disabled}
218
- accept={accept}
219
- onChange={onInputChange}
220
- spellCheck={rest.spellCheck || false}
221
- />
222
222
  </div>
223
223
  {!disabled && icon}
224
224
  <span className={classes["outline"]}></span>