@bitrise/bitkit 12.43.3 → 12.43.5
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
|
@@ -67,8 +67,9 @@ const FileInput = forwardRef<FileInputProps, 'div'>((props, ref) => {
|
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
69
|
if (accept) {
|
|
70
|
-
const
|
|
71
|
-
|
|
70
|
+
const firstFile = event.dataTransfer.files[0];
|
|
71
|
+
const extensionWithDot = `.${firstFile.name.split('.').pop()}`;
|
|
72
|
+
if (!accept.includes(firstFile.type) && !accept.includes(extensionWithDot)) {
|
|
72
73
|
setInternalErrorMessage(`Invalid format. You can upload only ${accept} file.`);
|
|
73
74
|
return;
|
|
74
75
|
}
|
|
@@ -3,8 +3,19 @@ import IconButton, { IconButtonProps } from '../IconButton/IconButton';
|
|
|
3
3
|
|
|
4
4
|
export type TableIconButtonProps = Omit<IconButtonProps, 'iconSize' | 'size' | 'variant'>;
|
|
5
5
|
|
|
6
|
-
const TableIconButton = forwardRef<TableIconButtonProps, 'button'>((props, ref) =>
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
const TableIconButton = forwardRef<TableIconButtonProps, 'button'>((props, ref) => {
|
|
7
|
+
const { isDanger } = props;
|
|
8
|
+
return (
|
|
9
|
+
<IconButton
|
|
10
|
+
color={isDanger ? undefined : 'purple.10'}
|
|
11
|
+
iconSize="24"
|
|
12
|
+
size="small"
|
|
13
|
+
isDanger={isDanger}
|
|
14
|
+
variant="tertiary"
|
|
15
|
+
ref={ref}
|
|
16
|
+
{...props}
|
|
17
|
+
/>
|
|
18
|
+
);
|
|
19
|
+
});
|
|
9
20
|
|
|
10
21
|
export default TableIconButton;
|