Skip to content

Commit fa43d98

Browse files
author
Egor Didenko
committed
feat(react-uploader): added the prop classNameUploader for styles
1 parent 76b1819 commit fa43d98

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

packages/react-uploader/src/Uploader/Inline/FileUploaderInline.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const AdapterFileUploaderInline = customElementToReactComponent({
1919
export const FileUploaderInline: FC<TProps> = ({
2020
ctxName,
2121
className,
22+
classNameUploader,
2223
apiRef,
2324
...props
2425
}) => {
@@ -40,7 +41,8 @@ export const FileUploaderInline: FC<TProps> = ({
4041
{...eventHandlers}
4142
/>
4243

43-
<AdapterFileUploaderInline ctx-name={CTX_NAME} />
44+
{/* @ts-ignore */}
45+
<AdapterFileUploaderInline class={classNameUploader} ctx-name={CTX_NAME} />
4446
</div>
4547
);
4648
};

packages/react-uploader/src/Uploader/Minimal/FileUploaderMinimal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const AdapterFileUploaderMinimal = customElementToReactComponent({
2020
export const FileUploaderMinimal: FC<TProps> = ({
2121
ctxName,
2222
className,
23+
classNameUploader,
2324
apiRef,
2425
...props
2526
}) => {
@@ -40,9 +41,8 @@ export const FileUploaderMinimal: FC<TProps> = ({
4041
ctx-name={CTX_NAME}
4142
{...eventHandlers}
4243
/>
43-
<AdapterFileUploaderMinimal
44-
ctx-name={CTX_NAME}
45-
/>
44+
{/* @ts-ignore */}
45+
<AdapterFileUploaderMinimal class={classNameUploader} ctx-name={CTX_NAME} />
4646
</div>
4747
);
4848
};

packages/react-uploader/src/Uploader/Regular/FileUploaderRegular.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const AdapterFileUploaderRegular = customElementToReactComponent({
1919
export const FileUploaderRegular: FC<TProps> = ({
2020
ctxName,
2121
className,
22+
classNameUploader,
2223
apiRef,
2324
...props
2425
}) => {
@@ -39,7 +40,8 @@ export const FileUploaderRegular: FC<TProps> = ({
3940
ctx-name={CTX_NAME}
4041
{...eventHandlers}
4142
/>
42-
<AdapterFileUploaderRegular ctx-name={CTX_NAME} />
43+
{/* @ts-ignore */}
44+
<AdapterFileUploaderRegular class={classNameUploader} ctx-name={CTX_NAME} />
4345
</div>
4446
);
4547
};

packages/react-uploader/src/Uploader/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ type TPropsWithConfig = Partial<ConfigType>;
2727

2828
type TDefaultProps = {
2929
className?: string;
30+
classNameUploader?: string;
3031
ctxName?: string;
3132
};
3233

0 commit comments

Comments
 (0)