Skip to content

Commit cf4fd3a

Browse files
committed
remove unneeded vote btn styles and only style it in one place using styled components
1 parent 6d44f42 commit cf4fd3a

File tree

3 files changed

+8
-30
lines changed

3 files changed

+8
-30
lines changed

redisinsight/ui/src/components/recommendation/recommendation-voting/components/vote-option/VoteOption.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { Nullable } from 'uiSrc/utils'
1414

1515
import { Col, FlexItem, Row } from 'uiSrc/components/base/layout/flex'
1616
import { Text } from 'uiSrc/components/base/text'
17-
import { CancelSlimIcon } from 'uiSrc/components/base/icons'
17+
import { CancelSlimIcon, Icon } from 'uiSrc/components/base/icons'
1818
import { IconButton } from 'uiSrc/components/base/forms/buttons'
1919
import { Link } from 'uiSrc/components/base/link/Link'
2020
import { RiPopover, RiTooltip } from 'uiSrc/components/base'
@@ -49,6 +49,12 @@ const GitHubLink = styled(Link)`
4949
}
5050
`
5151

52+
const VotingIconButton = styled(IconButton)`
53+
width: 28px !important;
54+
height: 28px !important;
55+
border-radius: 50%;
56+
`
57+
5258
export interface Props {
5359
voteOption: Vote
5460
vote?: Nullable<Vote>
@@ -130,7 +136,7 @@ const VoteOption = (props: Props) => {
130136
position="bottom"
131137
data-testid={`${voteOption}-vote-tooltip`}
132138
>
133-
<IconButton
139+
<VotingIconButton
134140
disabled={!isAnalyticsEnable}
135141
icon={iconType[voteOption] ?? 'LikeIcon'}
136142
className={cx('vote__btn', { selected: vote === voteOption })}

redisinsight/ui/src/components/recommendation/recommendation-voting/styles.module.scss

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,6 @@
33
.voteContent {
44
margin-left: 10px;
55

6-
.vote__btn {
7-
width: 28px !important;
8-
height: 28px !important;
9-
border-radius: 50%;
10-
11-
&:hover,
12-
&:focus,
13-
&.selected {
14-
transform: none;
15-
background-color: var(--separatorColor);
16-
}
17-
}
18-
196
svg {
207
width: 34px;
218
height: 34px;

redisinsight/ui/src/components/side-panels/panels/live-time-recommendations/components/recommendation/styles.module.scss

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -88,21 +88,6 @@
8888
font-size: inherit !important;
8989
}
9090
}
91-
92-
.link {
93-
color: var(--externalLinkColor) !important;
94-
}
95-
96-
:global {
97-
.vote__btn {
98-
&:hover,
99-
&:focus,
100-
&.selected {
101-
transform: none;
102-
background-color: var(--liveRecommendationVoteBgColor) !important;
103-
}
104-
}
105-
}
10691
}
10792

10893
.actions {

0 commit comments

Comments
 (0)