feat: complete the missing UI

This commit is contained in:
butterfly
2024-04-30 12:37:28 +08:00
parent 996537d262
commit c3d91bf0cd
21 changed files with 381 additions and 284 deletions

View File

@@ -5,6 +5,7 @@ export type ButtonType = "primary" | "danger" | null;
export interface BtnProps {
onClick?: () => void;
icon?: JSX.Element;
prefixIcon?: JSX.Element;
type?: ButtonType;
text?: React.ReactNode;
bordered?: boolean;
@@ -27,6 +28,7 @@ export default function Btn(props: BtnProps) {
disabled,
tabIndex,
autoFocus,
prefixIcon,
} = props;
let btnClassName;
@@ -61,6 +63,9 @@ export default function Btn(props: BtnProps) {
tabIndex={tabIndex}
autoFocus={autoFocus}
>
{prefixIcon && (
<div className={`flex items-center justify-center`}>{prefixIcon}</div>
)}
{text && (
<div className={`font-common text-sm-title leading-4 line-clamp-1`}>
{text}