d08842b576
新增PlatformUtilityInfoModal统一工具信息弹窗白底骨架 收口profile副弹层的摘要头列表骨架与内容行 同步更新PlatformUiKit收口计划与共享决策记录
64 lines
1.4 KiB
TypeScript
64 lines
1.4 KiB
TypeScript
import type { ReactNode } from 'react';
|
|
|
|
import { PlatformSubpanel } from './PlatformSubpanel';
|
|
|
|
type PlatformProfileContentRowProps = {
|
|
as?: 'div' | 'button';
|
|
children: ReactNode;
|
|
className?: string;
|
|
surface?: 'platform' | 'flat' | 'soft';
|
|
radius?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
padding?: 'none' | 'row' | 'xs' | 'sm' | 'md' | 'lg' | 'tight';
|
|
interactive?: boolean;
|
|
disabled?: boolean;
|
|
type?: 'button' | 'submit' | 'reset';
|
|
onClick?: () => void;
|
|
};
|
|
|
|
/**
|
|
* 个人中心白底 modal 内容行骨架。
|
|
* 只承接常见的 row 外壳与可点击语义,具体字段布局仍留在业务 modal 内部。
|
|
*/
|
|
export function PlatformProfileContentRow({
|
|
as = 'div',
|
|
children,
|
|
className,
|
|
surface = 'flat',
|
|
radius = 'xs',
|
|
padding = 'md',
|
|
interactive = as === 'button',
|
|
disabled,
|
|
type = 'button',
|
|
onClick,
|
|
}: PlatformProfileContentRowProps) {
|
|
if (as === 'button') {
|
|
return (
|
|
<PlatformSubpanel
|
|
as="button"
|
|
type={type}
|
|
onClick={onClick}
|
|
disabled={disabled}
|
|
interactive={interactive}
|
|
surface={surface}
|
|
radius={radius}
|
|
padding={padding}
|
|
className={className}
|
|
>
|
|
{children}
|
|
</PlatformSubpanel>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<PlatformSubpanel
|
|
as="div"
|
|
surface={surface}
|
|
radius={radius}
|
|
padding={padding}
|
|
className={className}
|
|
>
|
|
{children}
|
|
</PlatformSubpanel>
|
|
);
|
|
}
|