style: model list buttons

This commit is contained in:
jialin
2025-03-12 10:43:59 +08:00
parent a7cfa05504
commit 5edbc1a7b5
24 changed files with 460 additions and 157 deletions
@@ -7,9 +7,10 @@ interface NoteInfoProps {
required?: boolean;
label: React.ReactNode;
description?: React.ReactNode;
labelExtra?: React.ReactNode;
}
const NoteInfo: React.FC<NoteInfoProps> = (props) => {
const { required, description, label } = props || {};
const { required, description, label, labelExtra } = props || {};
if (!label) return null;
return (
@@ -43,6 +44,7 @@ const NoteInfo: React.FC<NoteInfoProps> = (props) => {
</span>
</>
)}
{labelExtra}
</span>
);
};
@@ -17,6 +17,7 @@ interface WrapperProps {
variant?: string;
hasPrefix?: boolean;
classList?: string;
labelExtra?: React.ReactNode;
onClick?: () => void;
}
@@ -35,6 +36,7 @@ const Wrapper: React.FC<WrapperProps> = ({
hasPrefix,
noWrapperStyle,
classList,
labelExtra,
onClick
}) => {
return (
@@ -74,6 +76,7 @@ const Wrapper: React.FC<WrapperProps> = ({
label={label}
required={required}
description={description}
labelExtra={labelExtra}
></LabelInfo>
</label>
{extra && <div className={wrapperStyle.extra}>{extra}</div>}
+2
View File
@@ -20,6 +20,7 @@ const SealInput: React.FC<InputProps & SealFormItemProps> = (props) => {
checkStatus,
trim = true,
loading,
labelExtra,
...rest
} = props;
const [isFocus, setIsFocus] = useState(false);
@@ -74,6 +75,7 @@ const SealInput: React.FC<InputProps & SealFormItemProps> = (props) => {
<Wrapper
status={checkStatus || status}
label={label}
labelExtra={labelExtra}
isFocus={isFocus}
required={required}
description={description}
+1
View File
@@ -9,6 +9,7 @@ export interface SealFormItemProps {
addAfter?: React.ReactNode;
allowNull?: boolean;
loading?: React.ReactNode;
labelExtra?: React.ReactNode;
trim?: boolean;
checkStatus?: 'success' | 'error' | 'warning' | '';
}