Browse Source
fix: fix tag border style (#42619)
* fix: fix tag style
* test: update snao
* test: update snap
pull/42624/head
lijianan
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
95 additions and
0 deletions
-
components/tag/__tests__/__snapshots__/demo-extend.test.ts.snap
-
components/tag/__tests__/__snapshots__/demo.test.ts.snap
-
components/tag/demo/borderless.tsx
-
components/tag/style/index.ts
|
@ -316,6 +316,46 @@ Array [ |
|
|
class="ant-space ant-space-horizontal ant-space-align-center" |
|
|
class="ant-space ant-space-horizontal ant-space-align-center" |
|
|
style="flex-wrap: wrap; margin-bottom: -8px;" |
|
|
style="flex-wrap: wrap; margin-bottom: -8px;" |
|
|
> |
|
|
> |
|
|
|
|
|
<div |
|
|
|
|
|
class="ant-space-item" |
|
|
|
|
|
style="margin-right: 0px; padding-bottom: 8px;" |
|
|
|
|
|
> |
|
|
|
|
|
<span |
|
|
|
|
|
class="ant-tag ant-tag-processing ant-tag-borderless" |
|
|
|
|
|
> |
|
|
|
|
|
processing |
|
|
|
|
|
</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div |
|
|
|
|
|
class="ant-space-item" |
|
|
|
|
|
style="margin-right: 0px; padding-bottom: 8px;" |
|
|
|
|
|
> |
|
|
|
|
|
<span |
|
|
|
|
|
class="ant-tag ant-tag-success ant-tag-borderless" |
|
|
|
|
|
> |
|
|
|
|
|
success |
|
|
|
|
|
</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div |
|
|
|
|
|
class="ant-space-item" |
|
|
|
|
|
style="margin-right: 0px; padding-bottom: 8px;" |
|
|
|
|
|
> |
|
|
|
|
|
<span |
|
|
|
|
|
class="ant-tag ant-tag-error ant-tag-borderless" |
|
|
|
|
|
> |
|
|
|
|
|
error |
|
|
|
|
|
</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div |
|
|
|
|
|
class="ant-space-item" |
|
|
|
|
|
style="margin-right: 0px; padding-bottom: 8px;" |
|
|
|
|
|
> |
|
|
|
|
|
<span |
|
|
|
|
|
class="ant-tag ant-tag-warning ant-tag-borderless" |
|
|
|
|
|
> |
|
|
|
|
|
warning |
|
|
|
|
|
</span> |
|
|
|
|
|
</div> |
|
|
<div |
|
|
<div |
|
|
class="ant-space-item" |
|
|
class="ant-space-item" |
|
|
style="margin-right: 0px; padding-bottom: 8px;" |
|
|
style="margin-right: 0px; padding-bottom: 8px;" |
|
|
|
@ -316,6 +316,46 @@ Array [ |
|
|
class="ant-space ant-space-horizontal ant-space-align-center" |
|
|
class="ant-space ant-space-horizontal ant-space-align-center" |
|
|
style="flex-wrap:wrap;margin-bottom:-8px" |
|
|
style="flex-wrap:wrap;margin-bottom:-8px" |
|
|
> |
|
|
> |
|
|
|
|
|
<div |
|
|
|
|
|
class="ant-space-item" |
|
|
|
|
|
style="margin-right:0;padding-bottom:8px" |
|
|
|
|
|
> |
|
|
|
|
|
<span |
|
|
|
|
|
class="ant-tag ant-tag-processing ant-tag-borderless" |
|
|
|
|
|
> |
|
|
|
|
|
processing |
|
|
|
|
|
</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div |
|
|
|
|
|
class="ant-space-item" |
|
|
|
|
|
style="margin-right:0;padding-bottom:8px" |
|
|
|
|
|
> |
|
|
|
|
|
<span |
|
|
|
|
|
class="ant-tag ant-tag-success ant-tag-borderless" |
|
|
|
|
|
> |
|
|
|
|
|
success |
|
|
|
|
|
</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div |
|
|
|
|
|
class="ant-space-item" |
|
|
|
|
|
style="margin-right:0;padding-bottom:8px" |
|
|
|
|
|
> |
|
|
|
|
|
<span |
|
|
|
|
|
class="ant-tag ant-tag-error ant-tag-borderless" |
|
|
|
|
|
> |
|
|
|
|
|
error |
|
|
|
|
|
</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div |
|
|
|
|
|
class="ant-space-item" |
|
|
|
|
|
style="margin-right:0;padding-bottom:8px" |
|
|
|
|
|
> |
|
|
|
|
|
<span |
|
|
|
|
|
class="ant-tag ant-tag-warning ant-tag-borderless" |
|
|
|
|
|
> |
|
|
|
|
|
warning |
|
|
|
|
|
</span> |
|
|
|
|
|
</div> |
|
|
<div |
|
|
<div |
|
|
class="ant-space-item" |
|
|
class="ant-space-item" |
|
|
style="margin-right:0;padding-bottom:8px" |
|
|
style="margin-right:0;padding-bottom:8px" |
|
|
|
@ -15,6 +15,18 @@ const App: React.FC = () => ( |
|
|
</Space> |
|
|
</Space> |
|
|
<Divider /> |
|
|
<Divider /> |
|
|
<Space size={[0, 'small']} wrap> |
|
|
<Space size={[0, 'small']} wrap> |
|
|
|
|
|
<Tag bordered={false} color="processing"> |
|
|
|
|
|
processing |
|
|
|
|
|
</Tag> |
|
|
|
|
|
<Tag bordered={false} color="success"> |
|
|
|
|
|
success |
|
|
|
|
|
</Tag> |
|
|
|
|
|
<Tag bordered={false} color="error"> |
|
|
|
|
|
error |
|
|
|
|
|
</Tag> |
|
|
|
|
|
<Tag bordered={false} color="warning"> |
|
|
|
|
|
warning |
|
|
|
|
|
</Tag> |
|
|
<Tag bordered={false} color="magenta"> |
|
|
<Tag bordered={false} color="magenta"> |
|
|
magenta |
|
|
magenta |
|
|
</Tag> |
|
|
</Tag> |
|
|
|
@ -32,6 +32,9 @@ const genTagStatusStyle = ( |
|
|
color: token[`color${cssVariableType}`], |
|
|
color: token[`color${cssVariableType}`], |
|
|
background: token[`color${capitalizedCssVariableType}Bg`], |
|
|
background: token[`color${capitalizedCssVariableType}Bg`], |
|
|
borderColor: token[`color${capitalizedCssVariableType}Border`], |
|
|
borderColor: token[`color${capitalizedCssVariableType}Border`], |
|
|
|
|
|
[`&${token.componentCls}-borderless`]: { |
|
|
|
|
|
borderColor: 'transparent', |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
}; |
|
|
}; |
|
|