Skip to content

Commit 1e8eb6c

Browse files
author
unknown
committed
1.1.0
1 parent 7156603 commit 1e8eb6c

File tree

12 files changed

+22
-17
lines changed

12 files changed

+22
-17
lines changed

README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MDB 5 React
22

3-
Version: FREE 1.0.0
3+
Version: FREE 1.1.0
44

55
Documentation:
66
https://mdbootstrap.com/docs/b5/react/

app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mdb-react-ui-kit-demo",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"main": "index.js",
55
"repository": {
66
"type": "git",

app/src/components/Button/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,6 @@ const MDBBtn: React.FC<ButtonProps> = React.forwardRef<HTMLAllCollection, Button
101101
}
102102
);
103103

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

106106
export default MDBBtn;

app/src/components/Modal/Modal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const MDBModal: React.FC<ModalProps> = ({
3737

3838
setTimeout(() => {
3939
setIsOpenBackrop(false);
40-
getOpenState(false);
40+
getOpenState && getOpenState(false);
4141
}, 150);
4242
setTimeout(() => {
4343
setInnerShow(false);
@@ -104,7 +104,7 @@ const MDBModal: React.FC<ModalProps> = ({
104104
}, 0);
105105
setTimeout(() => {
106106
setIsOpenModal(true);
107-
getOpenState(true);
107+
getOpenState && getOpenState(true);
108108
}, 150);
109109
} else {
110110
closeModal();

app/src/forms/Input/Input.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,15 @@ const MDBInput: React.FC<InputProps> = ({
5555

5656
useEffect(() => {
5757
if (labelReference.current) {
58-
setLabelWidth(labelReference.current.clientWidth * 0.8 + 8);
58+
if (labelReference.current?.clientWidth !== 0) setLabelWidth(labelReference.current.clientWidth * 0.8 + 8);
5959
}
60+
}, [labelReference, labelReference.current?.clientWidth]);
6061

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

6468
useEffect(() => {
6569
if (value === undefined) return;
@@ -86,6 +90,7 @@ const MDBInput: React.FC<InputProps> = ({
8690
className={inputClasses}
8791
onBlur={handleBlur}
8892
onChange={handleChange}
93+
onFocus={setWidth}
8994
value={value}
9095
id={id}
9196
ref={inputReference}
@@ -96,6 +101,7 @@ const MDBInput: React.FC<InputProps> = ({
96101
className={inputClasses}
97102
onBlur={handleBlur}
98103
onChange={handleChange}
104+
onFocus={setWidth}
99105
value={value}
100106
id={id}
101107
ref={inputReference}

app/src/navigation/Navbar/Navbar.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,14 @@ const MDBNavbar: React.FC<NavbarProps> = React.forwardRef<HTMLAllCollection, Nav
3434

3535
const classes = clsx(
3636
{
37-
'fixed-top': fixed,
38-
'sticky-top': sticky,
39-
4037
'navbar-light': light,
4138
'navbar-dark': dark,
4239
'scrolling-navbar': scrolling || scrollingNavbarOffset,
4340
'top-nav-collapse': collapsed,
4441
[`text-${color}`]: color && transparent ? collapsed : color,
4542
},
43+
fixed && `fixed-${fixed}`,
44+
sticky && 'sticky-top',
4645
'navbar',
4746
expand && getExpandClass(expand),
4847
bgColor && `bg-${bgColor}`,

app/src/navigation/Navbar/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ declare const MDBNavbar: React.FunctionComponent<{
2323
| 'white-50';
2424
expand?: string | boolean;
2525
bgColor?: 'white' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'light' | 'dark';
26-
fixed?: boolean;
26+
fixed?: string;
2727
sticky?: boolean;
2828
}>;
2929

app/src/navigation/Navbar/types.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type NavbarProps = {
88
color?: string;
99
expand?: string | boolean;
1010
bgColor?: string;
11-
fixed?: boolean;
11+
fixed?: string;
1212
sticky?: boolean;
1313
};
1414

dist/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ declare const MDBNavbar: React$1.FunctionComponent<{
305305
| 'white-50';
306306
expand?: string | boolean;
307307
bgColor?: 'white' | 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'light' | 'dark';
308-
fixed?: boolean;
308+
fixed?: string;
309309
sticky?: boolean;
310310
}>;
311311

dist/mdb-react-ui-kit.esm.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mdb-react-ui-kit.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mdb-react-ui-kit",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"main": "./dist/mdb-react-ui-kit.js",
55
"module": "./dist/mdb-react-ui-kit.esm.js",
66
"types": "./dist/index.d.ts",

0 commit comments

Comments
 (0)