-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathLightButton.tsx
50 lines (43 loc) · 1.41 KB
/
LightButton.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import React from "react";
import styled, { css } from "styled-components";
import { landscapeStyle } from "styles/landscapeStyle";
import { Button } from "@kleros/ui-components-library";
const StyledButton = styled(Button)<{ isMobileNavbar?: boolean }>`
background-color: transparent;
padding: 8px !important;
border-radius: 7px;
.button-text {
color: ${({ theme }) => theme.primaryText};
font-weight: 400;
}
.button-svg {
fill: ${({ theme, isMobileNavbar }) => (isMobileNavbar ? theme.secondaryPurple : `${theme.white}BF`)} !important;
}
&:hover {
.button-svg {
fill: ${({ theme, isMobileNavbar }) => (isMobileNavbar ? theme.secondaryPurple : `${theme.white}`)} !important;
}
transition: background-color 0.1s;
background-color: ${({ theme }) => theme.whiteLowOpacityStrong};
}
${landscapeStyle(
() => css`
padding: 8px !important;
.button-svg {
margin-right: 0;
}
`
)}
`;
interface ILightButton {
text: string;
Icon?: React.FC<React.SVGAttributes<SVGElement>>;
onClick?: React.MouseEventHandler<HTMLButtonElement>;
disabled?: boolean;
className?: string;
isMobileNavbar?: boolean;
}
const LightButton: React.FC<ILightButton> = ({ text, Icon, onClick, disabled, className, isMobileNavbar }) => (
<StyledButton variant="primary" small {...{ text, Icon, onClick, disabled, className, isMobileNavbar }} />
);
export default LightButton;