Skip to content

Commit

Permalink
Add classnames to main component
Browse files Browse the repository at this point in the history
  • Loading branch information
JelteMX committed Aug 31, 2020
1 parent e68d332 commit 3829b14
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 4 deletions.
11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "filedropper",
"widgetName": "FileDropper",
"version": "1.3.0",
"version": "1.3.1",
"description": "Drop files in your Mendix Application",
"copyright": "Mendix 2020",
"author": "Jelte Lagendijk",
Expand Down Expand Up @@ -31,6 +31,7 @@
"devDependencies": {
"@mendix/pluggable-widgets-tools": "^8.7.2",
"@types/big.js": "^4.0.5",
"@types/classnames": "^2.2.10",
"@types/enzyme": "^3.10.5",
"@types/enzyme-adapter-react-16": "^1.0.6",
"@types/jest": "^25.2.1",
Expand All @@ -49,6 +50,7 @@
"@bem-react/classname": "^1.5.8",
"@jeltemx/mendix-react-widget-utils": "^0.6.2",
"axios": "^0.19.2",
"classnames": "^2.2.6",
"core-js": "^3.6.5",
"filesize": "^6.1.0",
"md5": "^2.2.1",
Expand Down
2 changes: 2 additions & 0 deletions src/FileDropper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ class FileDropperContainer extends Component<FileDropperContainerProps, {}> {

render(): ReactNode {
const {
class: mainClasses,
uiDeleteButtonGlyph,
uiDeleteButtonStyle,
uiSaveButtonGlyph,
Expand Down Expand Up @@ -150,6 +151,7 @@ class FileDropperContainer extends Component<FileDropperContainerProps, {}> {
const uiDeleteFileText = this.props.textDeleteFileConfirm;

const ui: UIProps = {
mainClasses,
deleteButtonStyle,
saveButtonStyle,
errorButtonStyle,
Expand Down
2 changes: 2 additions & 0 deletions src/FileDropper.webmodeler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export class preview extends Component<FileDropperContainerProps> {

private getUIProps(props: FileDropperContainerProps): UIProps {
const {
class: mainClasses,
uiDeleteButtonGlyph,
uiDeleteButtonStyle,
uiSaveButtonGlyph,
Expand Down Expand Up @@ -93,6 +94,7 @@ export class preview extends Component<FileDropperContainerProps> {
const uiDeleteFileText = this.props.textDeleteFileConfirm;

return {
mainClasses,
deleteButtonStyle,
saveButtonStyle,
errorButtonStyle,
Expand Down
4 changes: 2 additions & 2 deletions src/components/FileDropper.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, ReactNode, createElement } from "react";
import { observer } from "mobx-react";
import classNames from "classnames";

import { classes } from "../util/classes";
import { FileDropperStore } from "../store/fileDropperStore";

import { FileList, UIProps } from "./FileList";
Expand Down Expand Up @@ -40,7 +40,7 @@ export class FileDropper extends Component<FileDropperProps, {}> {
const deleteAction = deleteFile.bind(store);

return (
<div className={classes()}>
<div className={classNames("filedropper", uiProps.mainClasses)}>
<FileDropZone
onDrop={this.onDrop}
accept={accept}
Expand Down
1 change: 1 addition & 0 deletions src/components/FileList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export interface UIProgressBarColors {
}

export interface UIProps {
mainClasses: null | string;
deleteButtonStyle: null | string;
saveButtonStyle: null | string;
errorButtonStyle: null | string;
Expand Down
2 changes: 1 addition & 1 deletion src/package.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<package xmlns="http://www.mendix.com/package/1.0/">
<clientModule name="FileDropper" version="1.3.0" xmlns="http://www.mendix.com/clientModule/1.0/">
<clientModule name="FileDropper" version="1.3.1" xmlns="http://www.mendix.com/clientModule/1.0/">
<widgetFiles>
<widgetFile path="FileDropper.xml"/>
</widgetFiles>
Expand Down

0 comments on commit 3829b14

Please sign in to comment.