mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 13:39:24 +08:00
fix(plugin-workflow): fix client warning (#4709)
* fix(plugin-workflow): fix client warning * fix(plugin-workflow): fix build error
This commit is contained in:
parent
a9f1ce7bd6
commit
8a629d06ad
@ -31,16 +31,17 @@ const useStyles = createStyles(({ css, token }) => ({
|
||||
}));
|
||||
|
||||
export function StatusButton(props) {
|
||||
const { status, statusMap, ...others } = props;
|
||||
const { styles } = useStyles();
|
||||
let tag = null;
|
||||
if (typeof props.status !== 'undefined' && props.statusMap?.[props.status]) {
|
||||
const { icon, color } = props.statusMap[props.status];
|
||||
if (typeof status !== 'undefined' && statusMap?.[status]) {
|
||||
const { icon, color } = statusMap[status];
|
||||
tag = <Tag color={color}>{icon}</Tag>;
|
||||
}
|
||||
|
||||
return (
|
||||
<Button
|
||||
{...props}
|
||||
{...others}
|
||||
shape="circle"
|
||||
size="small"
|
||||
className={classnames(tag ? styles.statusButtonClass : styles.noStatusButtonClass, props.className)}
|
||||
|
Loading…
x
Reference in New Issue
Block a user