2023-11-14 10:06:18 +08:00
|
|
|
import { unit } from '@ant-design/cssinjs';
|
2023-11-06 11:29:41 +08:00
|
|
|
|
2024-04-08 14:04:08 +08:00
|
|
|
import { genNoticeStyle, prepareComponentToken, prepareNotificationToken } from '.';
|
|
|
|
import { genSubStyleComponent } from '../../theme/internal';
|
|
|
|
|
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,
|
|
|
|
);
|