Repository navigation
Expand file tree
/
Copy pathstyledComponents.js
More file actions
80 lines (76 loc) · 2.47 KB
/
Copy pathstyledComponents.js
File metadata and controls
80 lines (76 loc) · 2.47 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import styled from 'styled-components';
import SendWhite from './sendWhite.svg'
import RefreshWhite from './refreshWhite.svg'
import {
buttonBGColor,
buttonDisabledBGColor,
chatBGColor,
buttonTextColor,
buttonDisabledTextColor,
chatBorderColor,
textColor,
buttonRefreshBGColor
} from '../../customization/styleVariables.js'
export const SubmitButton = styled.button`
border: 0;
font-size: 0.875em;
font-weight: 500;
outline: 0;
padding: 1rem;
-webkit-transition: all 0.5s ease;
transition: all 0.5s ease;
border-radius: 0.25rem;
cursor: default;
@media (max-width: 640px) {
display: none;
}
background: ${props => props.disabled ? chatBGColor : (props.refresh ? buttonRefreshBGColor : buttonBGColor)};
color: ${props => props.disabled ? buttonDisabledTextColor : buttonTextColor};
box-shadow: ${props => props.disabled ? "none" : "0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2)"};
position: ${props => props.hasTags ? "absolute" : "relative"};
right: ${props => props.hasTags ? "0.625rem" : 0};
bottom: ${props => props.hasTags ? 0 : "initial"};
`
export const SubmitButtonSmall = styled.button`
-webkit-transition: all 0.5s ease;
transition: all 0.5s ease;
border: 0;
border-radius: 50%;
width: 3rem;
height: 3rem;
position: absolute;
right: 0.625rem;
background: url(${props => props.refresh? RefreshWhite : SendWhite}) no-repeat center center;
background-color: ${props => props.disabled ? chatBGColor : (props.refresh ? buttonRefreshBGColor : buttonBGColor)};
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
@media (min-width: 641px) {
display: none;
}
&:disabled{
background-color: ${buttonDisabledBGColor};
}
top: ${props => props.hasTags ? 0 : "initial"};
transform: ${props => props.hasTags ? "translateY(-50%)" : "translateY(0%)"};
z-index: ${props => props.hasTags ? 10 : "initial"};
`
export const SubmitButtonSmallDisabled = SubmitButtonSmall.extend`
cursor: default;
background-color: ${buttonDisabledBGColor};
`
export const UserOptions = styled.section`
background: ${chatBGColor};
border-top: 1px solid ${chatBorderColor};
padding: 1.25rem;
width: 100%;
position: relative;
@media (max-width: 640px) {
padding: 0.625rem;
}
`
export const ChatLabel = styled.h4`
color: ${textColor};
font-weight: 500;
margin-bottom: 0.625rem;
z-index: 10;
position: relative;
`