CHANGED: style and components directories, removed redundant imports from styles

ADDED: container and card component, card-subcomponents WIP
This commit is contained in:
2024-02-03 01:34:54 +04:00
committed by doryan
parent 0ae3a6d980
commit df1d0c2599
75 changed files with 2509 additions and 2012 deletions

View File

@@ -0,0 +1,20 @@
import React, { forwardRef } from 'react';
import { SegmentedButtonProps } from './segmented-buttons.types';
export const SegmentedButtons = forwardRef<
HTMLDivElement,
SegmentedButtonProps
>(({ children, ...props }, ref) => {
if (children.length <= 1) {
throw 'You must build segmented button with 2 or more buttton';
}
return (
<div
className={`m3 m3-segmented-buttons ${props.className ?? ''}`.trimEnd()}
ref={ref}
>
{children}
</div>
);
});