dumi-theme-antd
Version:
Ant Design 5.0 官网风格类似的 dumi2 主题插件
25 lines • 831 B
JavaScript
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
var _excluded = ["children"];
import { Alert as AntdAlert } from 'antd';
import { jsx as ___EmotionJSX } from "@emotion/react";
var getAlertComponentProps = function getAlertComponentProps(rawProps) {
var nextProps = rawProps;
Object.keys(nextProps).forEach(function (key) {
if (nextProps[key] === '') {
nextProps[key] = true;
}
});
return nextProps;
};
var Alert = function Alert(props) {
var children = props.children,
restProps = _objectWithoutProperties(props, _excluded);
return ___EmotionJSX(AntdAlert, _extends({
style: {
marginBottom: 16
},
message: children
}, getAlertComponentProps(restProps)));
};
export default Alert;