mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
25 lines
535 B
TypeScript
25 lines
535 B
TypeScript
import clsx from 'clsx';
|
|
import type { PropsWithChildren, ReactNode } from 'react';
|
|
|
|
import { wrapper, wrapperDisabled } from './share.css';
|
|
|
|
interface SettingWrapperProps {
|
|
id?: string;
|
|
title?: ReactNode;
|
|
disabled?: boolean;
|
|
}
|
|
|
|
export const SettingWrapper = ({
|
|
id,
|
|
title,
|
|
children,
|
|
disabled,
|
|
}: PropsWithChildren<SettingWrapperProps>) => {
|
|
return (
|
|
<div id={id} className={clsx(wrapper, disabled && wrapperDisabled)}>
|
|
{title ? <div className="title">{title}</div> : null}
|
|
{children}
|
|
</div>
|
|
);
|
|
};
|