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
|
import styled, { keyframes } from 'styled-components';
const loading = keyframes`
from {
background-position: 0 0;
/* rotate: 0; */
}
to {
background-position: 100% 100%;
/* rotate: 360deg; */
}
`;
const Form = styled.form`
box-shadow: 0 0 5px 3px rgba(0, 0, 0, 0.05);
background: rgba(0, 0, 0, 0.02);
border: 5px solid white;
padding: 20px;
font-size: 1.5rem;
line-height: 1.5;
font-weight: 600;
label {
display: block;
margin-bottom: 1rem;
}
input,
textarea,
select {
width: 100%;
padding: 0.5rem;
font-size: 1rem;
border: 1px solid black;
&:focus {
outline: 0;
border-color: ${props => props.theme.red};
}
}
button,
input[type='submit'] {
width: auto;
background: red;
color: white;
border: 0;
font-size: 2rem;
font-weight: 600;
padding: 0.5rem 1.2rem;
}
fieldset {
border: 0;
padding: 0;
&[disabled] {
opacity: 0.5;
}
&::before {
height: 10px;
content: '';
display: block;
background-image: linear-gradient(to right, #ff3019 0%, #e2b04a 50%, #ff3019 100%);
}
&[aria-busy='true']::before {
background-size: 50% auto;
animation: ${loading} 0.5s linear infinite;
}
}
`;
export default Form;
|