style: model list buttons
This commit is contained in:
@@ -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>}
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -9,6 +9,7 @@ export interface SealFormItemProps {
|
||||
addAfter?: React.ReactNode;
|
||||
allowNull?: boolean;
|
||||
loading?: React.ReactNode;
|
||||
labelExtra?: React.ReactNode;
|
||||
trim?: boolean;
|
||||
checkStatus?: 'success' | 'error' | 'warning' | '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user