2023-11-06 11:29:41 +08:00
|
|
|
import { genSubStyleComponent } from '../../theme/internal';
|
|
|
|
import { prepareComponentToken, genNoticeStyle, prepareNotificationToken } from '.';
|
2023-11-14 10:06:18 +08:00
|
|
|
import { unit } from '@ant-design/cssinjs';
|
2023-11-06 11:29:41 +08:00
|
|
|
|
|
|
|
export default genSubStyleComponent(
|
|
|
|
['Notification', 'PurePanel'],
|
|
|
|
(token) => {
|
|
|
|
const noticeCls = `${token.componentCls}-notice`;
|
|
|
|
const notificationToken = prepareNotificationToken(token);
|
|
|
|
|
|
|
|
return {
|
|
|
|
[`${noticeCls}-pure-panel`]: {
|
|
|
|
...genNoticeStyle(notificationToken),
|
|
|
|
width: notificationToken.width,
|
2023-11-14 10:06:18 +08:00
|
|
|
maxWidth: `calc(100vw - ${unit(
|
|
|
|
token.calc(notificationToken.notificationMarginEdge).mul(2).equal(),
|
|
|
|
)})`,
|
2023-11-06 11:29:41 +08:00
|
|
|
margin: 0,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
},
|
|
|
|
prepareComponentToken,
|
|
|
|
);
|