diff --git a/components/alert/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/alert/__tests__/__snapshots__/demo-extend.test.ts.snap index b172abd57f..6dbefa9131 100644 --- a/components/alert/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/alert/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -165,7 +165,7 @@ exports[`renders components/alert/demo/action.tsx extend context correctly 1`] = class="ant-space-item" > @@ -46,7 +46,7 @@ const App: React.FC = () => ( - diff --git a/components/button/index.en-US.md b/components/button/index.en-US.md index 170ba9abd4..85c9385c6d 100644 --- a/components/button/index.en-US.md +++ b/components/button/index.en-US.md @@ -67,7 +67,7 @@ Different button styles can be generated by setting Button properties. The recom | size | Set the size of button | `large` \| `middle` \| `small` | `middle` | | | styles | Semantic DOM style | Record | - | 5.4.0 | | target | Same as target attribute of a, works when href is specified | string | - | | -| type | Can be set to `primary` `ghost` `dashed` `link` `text` `default` | string | `default` | | +| type | Set button type | `primary` \| `dashed` \| `link` \| `text` \| `default` | `default` | | | onClick | Set the handler to handle `click` event | (event: MouseEvent) => void | - | | It accepts all props which native buttons support. diff --git a/components/button/index.zh-CN.md b/components/button/index.zh-CN.md index 0331c8b263..7b0d3eb618 100644 --- a/components/button/index.zh-CN.md +++ b/components/button/index.zh-CN.md @@ -72,7 +72,7 @@ group: | size | 设置按钮大小 | `large` \| `middle` \| `small` | `middle` | | | styles | 语义化结构 style | Record | - | 5.4.0 | | target | 相当于 a 链接的 target 属性,href 存在时生效 | string | - | | -| type | 设置按钮类型 | `primary` \| `ghost` \| `dashed` \| `link` \| `text` \| `default` | `default` | | +| type | 设置按钮类型 | `primary` \| `dashed` \| `link` \| `text` \| `default` | `default` | | | onClick | 点击按钮时的回调 | (event: MouseEvent) => void | - | | 支持原生 button 的其他所有属性。 diff --git a/components/button/style/index.ts b/components/button/style/index.ts index 3737efe86c..1631719dbc 100644 --- a/components/button/style/index.ts +++ b/components/button/style/index.ts @@ -409,6 +409,13 @@ const genTypeButtonStyle: GenerateStyle = (token) => { [`${componentCls}-dashed`]: genDashedButtonStyle(token), [`${componentCls}-link`]: genLinkButtonStyle(token), [`${componentCls}-text`]: genTextButtonStyle(token), + [`${componentCls}-ghost`]: genGhostButtonStyle( + token.componentCls, + token.colorBgContainer, + token.colorBgContainer, + token.colorTextDisabled, + token.colorBorder, + ), }; };