Skip to content

Commit 653939c

Browse files
committed
fix vote option link (button) styles
1 parent 7e4d25d commit 653939c

File tree

1 file changed

+41
-21
lines changed
  • redisinsight/ui/src/components/recommendation/recommendation-voting/components/vote-option

1 file changed

+41
-21
lines changed

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

Lines changed: 41 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,39 @@ import { Nullable } from 'uiSrc/utils'
1515
import { Col, FlexItem, Row } from 'uiSrc/components/base/layout/flex'
1616
import { Text } from 'uiSrc/components/base/text'
1717
import { CancelSlimIcon } from 'uiSrc/components/base/icons'
18-
import { IconButton, PrimaryButton } from 'uiSrc/components/base/forms/buttons'
18+
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'
2121
import { RiIcon } from 'uiSrc/components/base/icons/RiIcon'
2222

2323
import { getVotedText, iconType, voteTooltip } from './utils'
2424
import styles from './styles.module.scss'
25+
import styled from 'styled-components'
26+
import { Theme } from 'uiSrc/components/base/theme/types'
27+
28+
const GitHubLink = styled(Link)`
29+
padding: 4px 8px 4px 4px;
30+
31+
margin-top: 10px;
32+
height: 22px !important;
33+
background-color: ${({ theme }: { theme: Theme }) =>
34+
theme.components.button.variants.primary.normal?.bgColor};
35+
color: ${({ theme }: { theme: Theme }) =>
36+
theme.components.button.variants.primary.normal?.textColor};
37+
&:hover {
38+
text-decoration: none !important;
39+
background-color: ${({ theme }: { theme: Theme }) =>
40+
theme.components.button.variants.primary.hover?.bgColor};
41+
color: ${({ theme }: { theme: Theme }) =>
42+
theme.components.button.variants.primary.normal?.textColor};
43+
}
44+
45+
& > span {
46+
display: flex;
47+
gap: 4px;
48+
align-items: center;
49+
}
50+
`
2551

2652
export interface Props {
2753
voteOption: Vote
@@ -148,28 +174,22 @@ const VoteOption = (props: Props) => {
148174
</Row>
149175
</FlexItem>
150176
<FlexItem grow>
151-
<PrimaryButton
152-
aria-label="recommendation feedback"
177+
<GitHubLink
153178
data-testid="recommendation-feedback-btn"
154-
className={styles.feedbackBtn}
155-
size="s"
179+
className={styles.link}
180+
href={EXTERNAL_LINKS.recommendationFeedback}
181+
target="_blank"
182+
data-test-subj="github-repo-link"
156183
>
157-
<Link
158-
className={styles.link}
159-
href={EXTERNAL_LINKS.recommendationFeedback}
160-
target="_blank"
161-
data-test-subj="github-repo-link"
162-
>
163-
<RiIcon
164-
className={styles.githubIcon}
165-
aria-label="redis insight github issues"
166-
type="GithubIcon"
167-
color="informative100"
168-
data-testid="github-repo-icon"
169-
/>
170-
To Github
171-
</Link>
172-
</PrimaryButton>
184+
<RiIcon
185+
className={styles.githubIcon}
186+
aria-label="redis insight github issues"
187+
type="GithubIcon"
188+
color="informative100"
189+
data-testid="github-repo-icon"
190+
/>
191+
To Github
192+
</GitHubLink>
173193
</FlexItem>
174194
</Col>
175195
</div>

0 commit comments

Comments
 (0)