fix: flexboxes containers

This commit is contained in:
doryan committed 2025-04-03 11:30:03 +04:00
1 parent d970f5a5b3
commit 627e33c4b7
20 files changed
+816 -1128

No files matched your search

+1 -1
View File
@@ -18,7 +18,7 @@ const Badge = forwardRef<SVGSVGElement, BadgeProps>(
>
{children && (
<text x={'50%'} y={'50%'}>
{children}
{parseInt(children) > 999 ? '999+' : children}
</text>
)}
</svg>
+20
View File
@@ -0,0 +1,20 @@
import React, { forwardRef, HTMLAttributes } from 'react';
export interface CardProps extends HTMLAttributes<HTMLDivElement> {
variant?: 'outlined' | 'filled' | 'elevated';
}
const Card = forwardRef<HTMLDivElement, CardProps>(
({ variant = 'filled', ...props }, ref) => {
const classes =
`m3 m3-card m3-card-${variant} ${props.className ?? ''}`.trimEnd();
return (
<div {...props} className={classes} ref={ref}>
{props.children}
</div>
);
},
);
export default Card;