Skip to content

Commit 173315a

Browse files
committed
release: 6.2.0
1 parent da743a6 commit 173315a

File tree

72 files changed

+1485
-1595
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1485
-1595
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 6.1.0
3+
Version: FREE 6.2.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": "6.1.0",
3+
"version": "6.2.0",
44
"main": "index.js",
55
"repository": {
66
"type": "git",

app/src/components/Accordion/Accordion.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ import type { AccordionProps } from './types';
44
import { AccordionContext } from './AccordionContext';
55

66
const MDBAccordion: React.FC<AccordionProps> = React.forwardRef<HTMLAllCollection, AccordionProps>(
7-
({ alwaysOpen, borderless, className, flush, initialActive, tag: Tag, children, onChange, ...props }, ref) => {
7+
(
8+
{ alwaysOpen, borderless, className, flush, initialActive = 0, tag: Tag = 'div', children, onChange, ...props },
9+
ref
10+
) => {
811
const classes = clsx('accordion', flush && 'accordion-flush', borderless && 'accordion-borderless', className);
912

1013
const [activeItem, setActiveItem] = useState(initialActive);
@@ -25,6 +28,4 @@ const MDBAccordion: React.FC<AccordionProps> = React.forwardRef<HTMLAllCollectio
2528
}
2629
);
2730

28-
MDBAccordion.defaultProps = { tag: 'div', initialActive: 0 };
29-
3031
export default MDBAccordion;

app/src/components/Accordion/AccordionItem/AccordionItem.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const MDBAccordionItem: React.FC<AccordionItemProps> = React.forwardRef<HTMLAllC
1515
headerTitle,
1616
headerStyle,
1717
btnClassName,
18-
tag: Tag,
18+
tag: Tag = 'div',
1919
children,
2020
...props
2121
},
@@ -62,6 +62,4 @@ const MDBAccordionItem: React.FC<AccordionItemProps> = React.forwardRef<HTMLAllC
6262
}
6363
);
6464

65-
MDBAccordionItem.defaultProps = { tag: 'div' };
66-
6765
export default MDBAccordionItem;

app/src/components/Badge/Badge.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react';
33
import type { BadgeProps } from './types';
44

55
const MDBBadge: React.FC<BadgeProps> = React.forwardRef<HTMLAllCollection, BadgeProps>(
6-
({ className, color, pill, light, dot, tag: Tag, children, notification, ...props }, ref) => {
6+
({ className, color = 'primary', pill, light, dot, tag: Tag = 'span', children, notification, ...props }, ref) => {
77
const classes = clsx(
88
'badge',
99
light ? color && `badge-${color}` : color && `bg-${color}`,
@@ -21,6 +21,4 @@ const MDBBadge: React.FC<BadgeProps> = React.forwardRef<HTMLAllCollection, Badge
2121
}
2222
);
2323

24-
MDBBadge.defaultProps = { tag: 'span', color: 'primary' };
25-
2624
export default MDBBadge;

app/src/components/Button/Button.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const MDBBtn: React.FC<ButtonProps> = React.forwardRef<HTMLAllCollection, Button
77
(
88
{
99
className,
10-
color,
10+
color = 'primary',
1111
outline,
1212
children,
1313
rounded,
@@ -19,7 +19,8 @@ const MDBBtn: React.FC<ButtonProps> = React.forwardRef<HTMLAllCollection, Button
1919
active,
2020
toggle,
2121
noRipple,
22-
tag: Tag,
22+
tag: Tag = 'button',
23+
role = 'button',
2324
...props
2425
},
2526
ref
@@ -74,6 +75,7 @@ const MDBBtn: React.FC<ButtonProps> = React.forwardRef<HTMLAllCollection, Button
7475
disabled={disabled && Tag === 'button' ? true : undefined}
7576
href={href}
7677
ref={ref}
78+
role={role}
7779
{...props}
7880
>
7981
{children}
@@ -93,6 +95,7 @@ const MDBBtn: React.FC<ButtonProps> = React.forwardRef<HTMLAllCollection, Button
9395
disabled={disabled && Tag === 'button' ? true : undefined}
9496
href={href}
9597
ref={ref}
98+
role={role}
9699
{...props}
97100
>
98101
{children}
@@ -101,6 +104,4 @@ const MDBBtn: React.FC<ButtonProps> = React.forwardRef<HTMLAllCollection, Button
101104
}
102105
);
103106

104-
MDBBtn.defaultProps = { tag: 'button', role: 'button', color: 'primary' };
105-
106107
export default MDBBtn;

app/src/components/ButtonGroup/ButtonGroup.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import clsx from 'clsx';
33
import type { ButtonGroupProps } from './types';
44

55
const MDBBtnGroup: React.FC<ButtonGroupProps> = React.forwardRef<HTMLAllCollection, ButtonGroupProps>(
6-
({ className, children, shadow, toolbar, size, vertical, tag: Tag, ...props }, ref) => {
6+
({ className, children, shadow, toolbar, size, vertical, tag: Tag = 'div', role = 'group', ...props }, ref) => {
77
let type;
88

99
if (toolbar) {
@@ -16,13 +16,11 @@ const MDBBtnGroup: React.FC<ButtonGroupProps> = React.forwardRef<HTMLAllCollecti
1616
const classes = clsx(type, shadow && `shadow-${shadow}`, size && `btn-group-${size}`, className);
1717

1818
return (
19-
<Tag className={classes} ref={ref} {...props}>
19+
<Tag className={classes} ref={ref} role={role} {...props}>
2020
{children}
2121
</Tag>
2222
);
2323
}
2424
);
2525

26-
MDBBtnGroup.defaultProps = { tag: 'div', role: 'group' };
27-
2826
export default MDBBtnGroup;

app/src/components/Card/Card.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import clsx from 'clsx';
33
import type { CardProps } from './types';
44

55
const MDBCard: React.FC<CardProps> = React.forwardRef<HTMLAllCollection, CardProps>(
6-
({ className, children, border, background, tag: Tag, shadow, alignment, ...props }, ref) => {
6+
({ className, children, border, background, tag: Tag = 'div', shadow, alignment, ...props }, ref) => {
77
const classes = clsx(
88
'card',
99
border && `border border-${border}`,
@@ -21,6 +21,4 @@ const MDBCard: React.FC<CardProps> = React.forwardRef<HTMLAllCollection, CardPro
2121
}
2222
);
2323

24-
MDBCard.defaultProps = { tag: 'div' };
25-
2624
export default MDBCard;

app/src/components/Card/CardBody/CardBody.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import clsx from 'clsx';
33
import type { CardBodyProps } from './types';
44

55
const MDBCardBody: React.FC<CardBodyProps> = React.forwardRef<HTMLAllCollection, CardBodyProps>(
6-
({ className, children, tag: Tag, ...props }, ref) => {
6+
({ className, children, tag: Tag = 'div', ...props }, ref) => {
77
const classes = clsx('card-body', className);
88

99
return (
@@ -14,6 +14,4 @@ const MDBCardBody: React.FC<CardBodyProps> = React.forwardRef<HTMLAllCollection,
1414
}
1515
);
1616

17-
MDBCardBody.defaultProps = { tag: 'div' };
18-
1917
export default MDBCardBody;

app/src/components/Card/CardFooter/CardFooter.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import clsx from 'clsx';
33
import type { CardFooterProps } from './types';
44

55
const MDBCardFooter: React.FC<CardFooterProps> = React.forwardRef<HTMLAllCollection, CardFooterProps>(
6-
({ className, children, border, background, tag: Tag, ...props }, ref) => {
6+
({ className, children, border, background, tag: Tag = 'div', ...props }, ref) => {
77
const classes = clsx('card-footer', border && `border-${border}`, background && `bg-${background}`, className);
88

99
return (
@@ -14,6 +14,4 @@ const MDBCardFooter: React.FC<CardFooterProps> = React.forwardRef<HTMLAllCollect
1414
}
1515
);
1616

17-
MDBCardFooter.defaultProps = { tag: 'div' };
18-
1917
export default MDBCardFooter;

0 commit comments

Comments
 (0)