-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Expand file tree
/
Copy pathStyledWrapper.js
More file actions
33 lines (27 loc) · 881 Bytes
/
StyledWrapper.js
File metadata and controls
33 lines (27 loc) · 881 Bytes
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
import styled from 'styled-components';
import { INPUT_SIZES } from './constants';
const StyledWrapper = styled.div`
position: relative;
width: 100%;
.input-wrapper-label {
display: block;
margin-bottom: 0.25rem;
font-size: ${(props) => props.theme.font.size[INPUT_SIZES[props.$size || 'md'].labelFontSize]};
color: ${(props) => props.theme.colors.text.body};
}
.input-wrapper-required {
color: ${(props) => props.theme.colors.text.danger};
margin-left: 0.125rem;
}
.input-wrapper-description {
font-size: ${(props) => props.theme.font.size.xs};
color: ${(props) => props.theme.colors.text.muted};
margin-bottom: 0.25rem;
}
.input-wrapper-error {
font-size: ${(props) => props.theme.font.size.xs};
color: ${(props) => props.theme.colors.text.danger};
margin-top: 0.25rem;
}
`;
export default StyledWrapper;