@soul-refiner/design-system 1.1.6 → 1.1.7

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.
@@ -14,6 +14,7 @@ export interface UploadProps extends React.PropsWithChildren {
14
14
  subtext?: string;
15
15
  text?: React.ReactNode;
16
16
  type: UploadTypes;
17
+ height?: number;
17
18
  }
18
- export declare const Upload: ({ background, borderColor, children, iconColor, multiple, onDrop, size, subtext, text, type, }: UploadProps) => React.JSX.Element;
19
+ export declare const Upload: ({ background, borderColor, children, iconColor, multiple, onDrop, size, subtext, text, type, height, }: UploadProps) => React.JSX.Element;
19
20
  export {};
@@ -4,7 +4,7 @@ import styled from 'styled-components';
4
4
  import { COLORS } from '../../../common';
5
5
  import { Box, Button, P } from '../../';
6
6
  import { UploadAudio, UploadFile, UploadImage, UploadVideo, } from '../../../icons';
7
- export const Upload = ({ background = 'hue-blue-3', borderColor = 'hue-blue-2', children, iconColor = 'primary-blue-2', multiple, onDrop, size = 'large', subtext, text, type, }) => {
7
+ export const Upload = ({ background = 'hue-blue-3', borderColor = 'hue-blue-2', children, iconColor = 'primary-blue-2', multiple, onDrop, size = 'large', subtext, text, type, height, }) => {
8
8
  const filesRef = React.useRef(null);
9
9
  const [draggingOver, setDraggingOver] = React.useState(false);
10
10
  const fileTypeLookup = {
@@ -113,7 +113,7 @@ export const Upload = ({ background = 'hue-blue-3', borderColor = 'hue-blue-2',
113
113
  filesRef.current.value = '';
114
114
  };
115
115
  return (React.createElement(React.Fragment, null,
116
- React.createElement(Wrapper, { "$background": background, "$borderColor": borderColor, "$draggingOver": draggingOver, "$height": heightLookup[type].height[size], "$size": size, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop },
116
+ React.createElement(Wrapper, { "$background": background, "$borderColor": borderColor, "$draggingOver": draggingOver, "$height": height || heightLookup[type].height[size], "$size": size, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop },
117
117
  React.createElement(Box, { "$align": "center", "$borderRadius": "medium", "$dir": "column", "$display": "flex", "$gap": 16, "$justify": "center", sx: "height: 100%; width: 100%; svg { flex-shrink: 0; };" },
118
118
  iconLookup[type],
119
119
  size !== 'small' && (React.createElement(Box, { "$align": "center", "$dir": "column", "$display": "flex", "$gap": 8, "$justify": "center", sx: "width: 100%;" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soul-refiner/design-system",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "main": "dist/index.js",
5
5
  "license": "MIT",
6
6
  "publishConfig": {