2018-03-17 00:58:25 +03:00
|
|
|
import { transparentize } from 'polished';
|
2018-03-23 17:16:13 +03:00
|
|
|
import styled from '../styled-components';
|
2018-01-22 21:30:53 +03:00
|
|
|
import { PropertyNameCell } from './fields-layout';
|
2017-10-12 00:01:37 +03:00
|
|
|
|
|
|
|
export const ClickablePropertyNameCell = PropertyNameCell.extend`
|
|
|
|
cursor: pointer;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const FieldLabel = styled.span`
|
|
|
|
vertical-align: middle;
|
|
|
|
font-size: 0.929em;
|
|
|
|
line-height: 20px;
|
|
|
|
`;
|
|
|
|
|
2018-03-18 12:13:08 +03:00
|
|
|
export const TypePrefix = FieldLabel.extend`
|
2018-03-20 17:15:36 +03:00
|
|
|
color: ${props => transparentize(0.2, props.theme.schemaView.typeNameColor)};
|
2017-10-12 00:01:37 +03:00
|
|
|
`;
|
|
|
|
|
2018-03-18 12:13:08 +03:00
|
|
|
export const TypeName = FieldLabel.extend`
|
2018-03-20 17:15:36 +03:00
|
|
|
color: ${props => props.theme.schemaView.typeNameColor};
|
2017-12-07 20:12:34 +03:00
|
|
|
`;
|
2018-03-20 17:15:36 +03:00
|
|
|
|
2018-03-18 12:13:08 +03:00
|
|
|
export const TypeTitle = FieldLabel.extend`
|
2018-03-20 17:15:36 +03:00
|
|
|
color: ${props => props.theme.schemaView.typeTitleColor};
|
2017-10-12 00:01:37 +03:00
|
|
|
`;
|
|
|
|
|
|
|
|
export const TypeFormat = TypeName;
|
|
|
|
|
2018-03-18 12:13:08 +03:00
|
|
|
export const RequiredLabel = FieldLabel.withComponent('div').extend`
|
2018-03-20 17:15:36 +03:00
|
|
|
color: ${props => props.theme.schemaView.requireLabelColor};
|
2018-01-10 14:01:20 +03:00
|
|
|
font-size: 11px;
|
|
|
|
font-weight: normal;
|
|
|
|
margin-left: 20px;
|
|
|
|
line-height: 1;
|
|
|
|
font-weight: normal;
|
2017-10-12 00:01:37 +03:00
|
|
|
`;
|
|
|
|
|
2018-03-18 12:13:08 +03:00
|
|
|
export const RecursiveLabel = FieldLabel.extend`
|
2017-10-12 00:01:37 +03:00
|
|
|
color: #dd9900;
|
|
|
|
font-size: 13px;
|
|
|
|
`;
|
|
|
|
|
2018-03-18 12:13:08 +03:00
|
|
|
export const NullableLabel = FieldLabel.extend`
|
2017-10-12 00:01:37 +03:00
|
|
|
color: #3195a6;
|
|
|
|
font-size: 13px;
|
|
|
|
`;
|
|
|
|
|
2018-03-18 12:13:08 +03:00
|
|
|
export const PatternLabel = FieldLabel.extend`
|
2017-10-12 00:01:37 +03:00
|
|
|
color: #3195a6;
|
|
|
|
&::before,
|
|
|
|
&::after {
|
|
|
|
content: '/';
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
|
|
|
export const ExampleValue = styled.span`
|
|
|
|
font-family: ${props => props.theme.code.fontFamily};
|
2018-03-17 00:56:53 +03:00
|
|
|
background-color: ${props => transparentize(0.98, props.theme.colors.text)};
|
|
|
|
border: 1px solid ${props => transparentize(0.85, props.theme.colors.text)};
|
2017-10-12 00:01:37 +03:00
|
|
|
margin: 0 3px;
|
|
|
|
padding: 0.4em 0.2em 0.2em;
|
|
|
|
font-size: 0.8em;
|
|
|
|
border-radius: 2px;
|
2018-03-17 00:56:53 +03:00
|
|
|
color: ${props => transparentize(0.1, props.theme.colors.text)};
|
2017-10-12 00:01:37 +03:00
|
|
|
display: inline-block;
|
|
|
|
min-width: 20px;
|
|
|
|
text-align: center;
|
|
|
|
line-height: 1;
|
|
|
|
vertical-align: middle;
|
|
|
|
`;
|
|
|
|
|
2018-03-18 12:13:08 +03:00
|
|
|
export const ConstraintItem = FieldLabel.extend`
|
2018-03-17 00:56:53 +03:00
|
|
|
background-color: ${props => transparentize(0.85, props.theme.colors.main)};
|
|
|
|
color: ${props => transparentize(0.4, props.theme.colors.main)};
|
2017-10-12 00:01:37 +03:00
|
|
|
margin-right: 6px;
|
|
|
|
margin-left: 6px;
|
|
|
|
border-radius: 2px;
|
|
|
|
padding: 0 4px;
|
|
|
|
`;
|