diff --git a/packages/design/src/alert/demo/action.tsx b/packages/design/src/alert/demo/action.tsx index 90820d4b9..5e72c4edb 100644 --- a/packages/design/src/alert/demo/action.tsx +++ b/packages/design/src/alert/demo/action.tsx @@ -12,39 +12,31 @@ const App: React.FC = () => ( description="Detailed description and advice about successful copywriting." type="success" showIcon - action={ - - } + closable + action={} /> - Detail - - } + closable + action={} /> - Detail - - } + closable + action={} /> Detail diff --git a/packages/design/src/alert/demo/over-length.tsx b/packages/design/src/alert/demo/over-length.tsx index 9dbcc53fc..8e502c835 100644 --- a/packages/design/src/alert/demo/over-length.tsx +++ b/packages/design/src/alert/demo/over-length.tsx @@ -18,13 +18,13 @@ const App: React.FC = () => ( message="Success Tips. Success Tips. Success Tips. Success Tips. Success Tips. Success Tips. Success Tips. Success Tips. Success Tips. Success Tips. Success Tips. Success Tips. Success Tips. Success Tips. Success Tips. Success Tips. Success Tips. Success Tips. Success Tips. Success Tips." type="success" showIcon - closable - closeIcon={Close} + action={Detail} /> Detail} /> ( description="Detailed description and advice about successful copywriting. Detailed description and advice about successful copywriting. Detailed description and advice about successful copywriting. Detailed description and advice about successful copywriting. Detailed description and advice about successful copywriting." type="success" showIcon - closable - onClose={onClose} + action={} /> - Detail - - } + closable + action={} /> ); diff --git a/packages/design/src/alert/style/index.ts b/packages/design/src/alert/style/index.ts index d88377560..3ba78d832 100644 --- a/packages/design/src/alert/style/index.ts +++ b/packages/design/src/alert/style/index.ts @@ -69,6 +69,7 @@ export const genAlertStyle: GenerateStyle = (token: AlertToken): CSS [`${componentCls}`]: { // vertical align to flex-start alignItems: 'flex-start !important', + paddingRight: token.padding, [`${componentCls}-icon`]: { height, }, @@ -81,14 +82,25 @@ export const genAlertStyle: GenerateStyle = (token: AlertToken): CSS }, }, }, + [`${componentCls}:not(${componentCls}-with-description)`]: { + paddingLeft: token.padding, + }, [`${componentCls}${componentCls}-with-description`]: { paddingBlock: token.padding, [`${componentCls}-message`]: { + fontWeight: 500, marginBottom: token.marginXXS, }, + [`${componentCls}-description`]: { + color: token.colorTextSecondary, + }, [`${componentCls}-icon`]: { fontSize: token.fontSizeHeading4, height: token.fontSizeHeading3, + marginInlineEnd: token.margin, + }, + [`${componentCls}-action`]: { + marginInlineStart: token.marginXS, }, }, [`${componentCls}:not(${componentCls}-banner):not(${componentCls}-ghost)`]: {