18 lines
574 B
TypeScript
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>
|
|
);
|
|
}
|