Evo.External.App/packages/ui/container.tsx
vchikalkin d6eacfc0c9 packages/ui: add checkbox
refactor ElementContainer
2023-11-09 18:03:32 +03:00

18 lines
574 B
TypeScript

import type { HTMLAttributes, PropsWithChildren } from 'react';
export type ContainerProps = HTMLAttributes<HTMLDivElement> & PropsWithChildren;
export function ElementContainer({ children, id, title, ...props }: ContainerProps) {
return (
<div {...props} className="flex flex-col">
<label
htmlFor={id}
className="mb-1 block overflow-hidden overflow-ellipsis whitespace-nowrap text-sm font-medium text-black text-opacity-90"
>
{title}
</label>
<div className="flex h-9 items-center">{children}</div>
</div>
);
}