amis-rpc-design/node_modules/antd/es/form/style/fallbackCmp.js

29 lines
846 B
JavaScript
Raw Normal View History

2023-10-07 19:42:30 +08:00
/**
* Fallback of IE.
* Safe to remove.
*/
// Style as inline component
import { prepareToken } from '.';
import { genSubStyleComponent } from '../../theme/internal';
// ============================= Fallback =============================
const genFallbackStyle = token => {
const {
formItemCls
} = token;
return {
'@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)': {
// Fallback for IE, safe to remove we not support it anymore
[`${formItemCls}-control`]: {
display: 'flex'
}
}
};
};
// ============================== Export ==============================
export default genSubStyleComponent(['Form', 'item-item'], (token, _ref) => {
let {
rootPrefixCls
} = _ref;
const formToken = prepareToken(token, rootPrefixCls);
return [genFallbackStyle(formToken)];
});