mirror of
https://github.com/ershisan99/DevToysWeb.git
synced 2025-12-16 12:32:48 +00:00
24 lines
622 B
TypeScript
24 lines
622 B
TypeScript
type Props = {
|
|
icon: React.ReactNode;
|
|
title: string;
|
|
description?: string;
|
|
control: React.ReactNode;
|
|
};
|
|
|
|
export function Configuration({ icon, title, description, control }: Props) {
|
|
return (
|
|
<div className="flex h-16 items-center gap-6 rounded border bg-configuration px-4">
|
|
{icon}
|
|
{description ? (
|
|
<div className="flex flex-col">
|
|
<span>{title}</span>
|
|
<span className="text-xs text-muted-foreground">{description}</span>
|
|
</div>
|
|
) : (
|
|
<span>{title}</span>
|
|
)}
|
|
<div className="flex flex-1 justify-end">{control}</div>
|
|
</div>
|
|
);
|
|
}
|