mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-28 05:05:48 +08:00
Tweak CheckableTag style
This commit is contained in:
parent
2fe4ac1a30
commit
8f98ae80bd
@ -259,13 +259,15 @@ exports[`renders ./components/tag/demo/control.md correctly 1`] = `
|
||||
|
||||
exports[`renders ./components/tag/demo/hot-tags.md correctly 1`] = `
|
||||
<div>
|
||||
<strong>
|
||||
Hots:
|
||||
<strong
|
||||
style="margin-right:8px;"
|
||||
>
|
||||
Categories:
|
||||
</strong>
|
||||
<div
|
||||
class="ant-tag ant-tag-checkable"
|
||||
>
|
||||
Movie
|
||||
Movies
|
||||
</div>
|
||||
<div
|
||||
class="ant-tag ant-tag-checkable"
|
||||
@ -277,5 +279,10 @@ exports[`renders ./components/tag/demo/hot-tags.md correctly 1`] = `
|
||||
>
|
||||
Music
|
||||
</div>
|
||||
<div
|
||||
class="ant-tag ant-tag-checkable"
|
||||
>
|
||||
Sports
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
@ -17,7 +17,7 @@ Select your favourite topics.
|
||||
import { Tag } from 'antd';
|
||||
const CheckableTag = Tag.CheckableTag;
|
||||
|
||||
const tagsFromServer = ['Movie', 'Books', 'Music'];
|
||||
const tagsFromServer = ['Movies', 'Books', 'Music', 'Sports'];
|
||||
|
||||
class HotTags extends React.Component {
|
||||
state = {
|
||||
@ -37,7 +37,7 @@ class HotTags extends React.Component {
|
||||
const { selectedTags } = this.state;
|
||||
return (
|
||||
<div>
|
||||
<strong>Hots: </strong>
|
||||
<strong style={{ marginRight: 8 }}>Categories:</strong>
|
||||
{tagsFromServer.map(tag => (
|
||||
<CheckableTag
|
||||
key={tag}
|
||||
|
@ -63,14 +63,13 @@
|
||||
&-checkable {
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
&:hover,
|
||||
&:not(&-checked):hover {
|
||||
color: @primary-color;
|
||||
}
|
||||
&:active,
|
||||
&-checked {
|
||||
color: #fff;
|
||||
}
|
||||
&:hover {
|
||||
background-color: @primary-5;
|
||||
}
|
||||
&-checked {
|
||||
background-color: @primary-6;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user