2019-11-23 19:41:14 +07:00
|
|
|
import styled from '@emotion/styled';
|
2019-02-03 17:23:33 +07:00
|
|
|
import { Link } from 'react-router-dom';
|
|
|
|
|
2019-03-28 05:39:06 +07:00
|
|
|
import { breakpoints } from '../../utils/styles/media';
|
|
|
|
import Ico from '../Icon';
|
2019-02-03 17:23:33 +07:00
|
|
|
import Label from '../Label';
|
2019-08-09 04:08:37 +07:00
|
|
|
import { fontWeight } from '../../utils/styles/sizes';
|
2019-10-03 23:17:04 +07:00
|
|
|
import { default as MuiIconButton } from '../../muiComponents/IconButton';
|
2019-10-06 23:30:05 +07:00
|
|
|
import { default as Photo } from '../../muiComponents/Avatar';
|
2019-10-13 03:26:56 +07:00
|
|
|
import List from '../../muiComponents/List';
|
2019-10-13 02:41:42 +07:00
|
|
|
import { default as Typography } from '../../muiComponents/Heading';
|
2019-10-31 14:12:18 +07:00
|
|
|
import Grid from '../../muiComponents/Grid';
|
|
|
|
import ListItemText from '../../muiComponents/ListItemText';
|
2019-11-23 19:41:14 +07:00
|
|
|
import { Theme } from '../../design-tokens/theme';
|
|
|
|
|
|
|
|
export const OverviewItem = styled('span')<{ theme?: Theme }>(props => ({
|
|
|
|
display: 'flex',
|
|
|
|
alignItems: 'center',
|
|
|
|
margin: '0 0 0 16px',
|
|
|
|
color: props.theme && props.theme.palette.greyLight2,
|
|
|
|
fontSize: 12,
|
|
|
|
[`@media (max-width: ${breakpoints.medium}px)`]: {
|
|
|
|
':nth-of-type(3)': {
|
|
|
|
display: 'none',
|
|
|
|
},
|
2019-07-15 16:57:32 +07:00
|
|
|
},
|
2019-11-23 19:41:14 +07:00
|
|
|
[`@media (max-width: ${breakpoints.small}px)`]: {
|
|
|
|
':nth-of-type(4)': {
|
|
|
|
display: 'none',
|
|
|
|
},
|
2019-07-15 16:57:32 +07:00
|
|
|
},
|
2019-11-23 19:41:14 +07:00
|
|
|
}));
|
2019-02-03 17:23:33 +07:00
|
|
|
|
2019-11-23 19:41:14 +07:00
|
|
|
export const Icon = styled(Ico)<{ theme?: Theme }>(props => ({
|
|
|
|
margin: '2px 10px 0 0',
|
|
|
|
fill: props.theme && props.theme.palette.greyLight2,
|
|
|
|
}));
|
|
|
|
|
|
|
|
export const Published = styled('span')<{ theme?: Theme }>(props => ({
|
|
|
|
color: props.theme && props.theme.palette.greyLight2,
|
|
|
|
margin: '0 5px 0 0',
|
|
|
|
}));
|
|
|
|
|
|
|
|
export const Text = styled(Label)<{ theme?: Theme }>(props => ({
|
|
|
|
fontSize: '12px',
|
|
|
|
fontWeight: fontWeight.semiBold,
|
|
|
|
color: props.theme && props.theme.palette.greyLight2,
|
|
|
|
}));
|
2019-02-03 17:23:33 +07:00
|
|
|
|
2019-07-15 16:57:32 +07:00
|
|
|
export const Details = styled('span')({
|
2019-11-23 19:41:14 +07:00
|
|
|
marginLeft: '5px',
|
|
|
|
lineHeight: 1.5,
|
|
|
|
display: 'flex',
|
|
|
|
flexDirection: 'column',
|
2019-07-15 16:57:32 +07:00
|
|
|
});
|
2019-02-03 17:23:33 +07:00
|
|
|
|
2019-07-15 16:57:32 +07:00
|
|
|
export const Author = styled('div')({
|
2019-11-23 19:41:14 +07:00
|
|
|
display: 'flex',
|
|
|
|
alignItems: 'center',
|
2019-07-15 16:57:32 +07:00
|
|
|
});
|
2019-02-03 17:23:33 +07:00
|
|
|
|
2019-07-15 16:57:32 +07:00
|
|
|
export const Avatar = styled(Photo)({
|
2019-11-23 19:41:14 +07:00
|
|
|
width: '20px',
|
|
|
|
height: '20px',
|
2019-07-15 16:57:32 +07:00
|
|
|
});
|
2019-02-03 17:23:33 +07:00
|
|
|
|
2019-07-15 16:57:32 +07:00
|
|
|
export const WrapperLink = styled(Link)({
|
2019-11-23 19:41:14 +07:00
|
|
|
textDecoration: 'none',
|
2019-07-15 16:57:32 +07:00
|
|
|
});
|
2019-02-03 17:23:33 +07:00
|
|
|
|
2019-11-23 19:41:14 +07:00
|
|
|
export const PackageTitle = styled('span')<{ theme?: Theme }>(props => ({
|
|
|
|
fontWeight: 600,
|
|
|
|
fontSize: 20,
|
|
|
|
display: 'block',
|
|
|
|
marginBottom: 12,
|
|
|
|
color: props.theme && props.theme.palette.eclipse,
|
|
|
|
cursor: 'pointer',
|
|
|
|
':hover': {
|
|
|
|
color: props.theme && props.theme.palette.black,
|
|
|
|
},
|
|
|
|
[`@media (max-width: ${breakpoints.small}px)`]: {
|
|
|
|
fontSize: 14,
|
|
|
|
marginBottom: 8,
|
|
|
|
},
|
|
|
|
}));
|
2019-02-03 17:23:33 +07:00
|
|
|
|
2019-07-15 16:57:32 +07:00
|
|
|
export const GridRightAligned = styled(Grid)({
|
2019-11-23 19:41:14 +07:00
|
|
|
textAlign: 'right',
|
2019-07-15 16:57:32 +07:00
|
|
|
});
|
2019-02-03 17:23:33 +07:00
|
|
|
|
2019-11-23 19:41:14 +07:00
|
|
|
export const PackageList = styled(List)<{ theme?: Theme }>(props => ({
|
|
|
|
padding: '12px 0 12px 0',
|
|
|
|
':hover': {
|
|
|
|
backgroundColor: props.theme && props.theme.palette.greyLight3,
|
2019-07-15 16:57:32 +07:00
|
|
|
},
|
2019-11-23 19:41:14 +07:00
|
|
|
'> :last-child': {
|
|
|
|
paddingTop: 0,
|
|
|
|
},
|
|
|
|
}));
|
2019-02-03 17:23:33 +07:00
|
|
|
|
2019-07-15 16:57:32 +07:00
|
|
|
export const IconButton = styled(MuiIconButton)({
|
2019-11-23 19:41:14 +07:00
|
|
|
padding: 6,
|
|
|
|
svg: {
|
|
|
|
fontSize: 16,
|
2019-07-15 16:57:32 +07:00
|
|
|
},
|
|
|
|
});
|
2019-02-03 17:23:33 +07:00
|
|
|
|
2019-11-23 19:41:14 +07:00
|
|
|
export const TagContainer = styled('span')({
|
|
|
|
marginTop: 8,
|
|
|
|
marginBottom: 12,
|
|
|
|
display: 'block',
|
|
|
|
[`@media (max-width: ${breakpoints.medium}px)`]: {
|
|
|
|
display: 'none',
|
|
|
|
},
|
|
|
|
});
|
2019-02-03 17:23:33 +07:00
|
|
|
|
2019-07-15 16:57:32 +07:00
|
|
|
export const PackageListItemText = styled(ListItemText)({
|
2019-11-23 19:41:14 +07:00
|
|
|
paddingRight: 0,
|
2019-07-15 16:57:32 +07:00
|
|
|
});
|
2019-02-03 17:23:33 +07:00
|
|
|
|
2019-11-23 19:41:14 +07:00
|
|
|
export const Description = styled(Typography)<{ theme?: Theme }>(props => ({
|
|
|
|
color: props.theme && props.theme.palette.greyDark2,
|
2019-07-15 15:41:12 +07:00
|
|
|
fontSize: '14px',
|
|
|
|
paddingRight: 0,
|
2019-11-23 19:41:14 +07:00
|
|
|
}));
|