Skip to content

Commit

Permalink
1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed Aug 31, 2021
1 parent 7156603 commit 1e8eb6c
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MDB 5 React

Version: FREE 1.0.0
Version: FREE 1.1.0

Documentation:
https://mdbootstrap.com/docs/b5/react/
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mdb-react-ui-kit-demo",
"version": "1.0.0",
"version": "1.1.0",
"main": "index.js",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion app/src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,6 @@ const MDBBtn: React.FC<ButtonProps> = React.forwardRef<HTMLAllCollection, Button
}
);

MDBBtn.defaultProps = { tag: 'button', type: 'button', role: 'button', color: 'primary' };
MDBBtn.defaultProps = { tag: 'button', role: 'button', color: 'primary' };

export default MDBBtn;
4 changes: 2 additions & 2 deletions app/src/components/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const MDBModal: React.FC<ModalProps> = ({

setTimeout(() => {
setIsOpenBackrop(false);
getOpenState(false);
getOpenState && getOpenState(false);
}, 150);
setTimeout(() => {
setInnerShow(false);
Expand Down Expand Up @@ -104,7 +104,7 @@ const MDBModal: React.FC<ModalProps> = ({
}, 0);
setTimeout(() => {
setIsOpenModal(true);
getOpenState(true);
getOpenState && getOpenState(true);
}, 150);
} else {
closeModal();
Expand Down
12 changes: 9 additions & 3 deletions app/src/forms/Input/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,15 @@ const MDBInput: React.FC<InputProps> = ({

useEffect(() => {
if (labelReference.current) {
setLabelWidth(labelReference.current.clientWidth * 0.8 + 8);
if (labelReference.current?.clientWidth !== 0) setLabelWidth(labelReference.current.clientWidth * 0.8 + 8);
}
}, [labelReference, labelReference.current?.clientWidth]);

// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const setWidth = () => {
if (labelReference.current) {
setLabelWidth(labelReference.current.clientWidth * 0.8 + 8);
}
};

useEffect(() => {
if (value === undefined) return;
Expand All @@ -86,6 +90,7 @@ const MDBInput: React.FC<InputProps> = ({
className={inputClasses}
onBlur={handleBlur}
onChange={handleChange}
onFocus={setWidth}
value={value}
id={id}
ref={inputReference}
Expand All @@ -96,6 +101,7 @@ const MDBInput: React.FC<InputProps> = ({
className={inputClasses}
onBlur={handleBlur}
onChange={handleChange}
onFocus={setWidth}
value={value}
id={id}
ref={inputReference}
Expand Down
5 changes: 2 additions & 3 deletions app/src/navigation/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,14 @@ const MDBNavbar: React.FC<NavbarProps> = React.forwardRef<HTMLAllCollection, Nav

const classes = clsx(
{
'fixed-top': fixed,
'sticky-top': sticky,

'navbar-light': light,
'navbar-dark': dark,
'scrolling-navbar': scrolling || scrollingNavbarOffset,
'top-nav-collapse': collapsed,
[`text-${color}`]: color && transparent ? collapsed : color,
},
fixed && `fixed-${fixed}`,
sticky && 'sticky-top',
'navbar',
expand && getExpandClass(expand),
bgColor && `bg-${bgColor}`,
Expand Down
2 changes: 1 addition & 1 deletion app/src/navigation/Navbar/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ declare const MDBNavbar: React.FunctionComponent<{
| 'white-50';
expand?: string | boolean;
bgColor?: 'white' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'light' | 'dark';
fixed?: boolean;
fixed?: string;
sticky?: boolean;
}>;

Expand Down
2 changes: 1 addition & 1 deletion app/src/navigation/Navbar/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type NavbarProps = {
color?: string;
expand?: string | boolean;
bgColor?: string;
fixed?: boolean;
fixed?: string;
sticky?: boolean;
};

Expand Down
2 changes: 1 addition & 1 deletion dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ declare const MDBNavbar: React$1.FunctionComponent<{
| 'white-50';
expand?: string | boolean;
bgColor?: 'white' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'light' | 'dark';
fixed?: boolean;
fixed?: string;
sticky?: boolean;
}>;

Expand Down
2 changes: 1 addition & 1 deletion dist/mdb-react-ui-kit.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/mdb-react-ui-kit.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mdb-react-ui-kit",
"version": "1.0.0",
"version": "1.1.0",
"main": "./dist/mdb-react-ui-kit.js",
"module": "./dist/mdb-react-ui-kit.esm.js",
"types": "./dist/index.d.ts",
Expand Down

0 comments on commit 1e8eb6c

Please sign in to comment.