Document stars
This commit is contained in:
@ -5,7 +5,7 @@ import { Link } from 'react-router-dom';
|
|||||||
import Document from 'models/Document';
|
import Document from 'models/Document';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
import { color } from 'styles/constants';
|
import { color } from 'styles/constants';
|
||||||
import Icon from 'components/Icon';
|
import StarredIcon from 'components/Icon/StarredIcon';
|
||||||
import PublishingInfo from './components/PublishingInfo';
|
import PublishingInfo from './components/PublishingInfo';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
@ -15,18 +15,13 @@ type Props = {
|
|||||||
innerRef?: Function,
|
innerRef?: Function,
|
||||||
};
|
};
|
||||||
|
|
||||||
const StyledStar = styled(({ solid, ...props }) => <Icon {...props} />).attrs({
|
const StyledStar = styled(({ solid, ...props }) => (
|
||||||
type: 'Star',
|
<StarredIcon color={solid ? color.black : color.text} {...props} />
|
||||||
color: color.text,
|
))`
|
||||||
})`
|
position: absolute;
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
top: 1px;
|
|
||||||
margin-left: 4px;
|
|
||||||
opacity: ${props => (props.solid ? '1 !important' : 0)};
|
opacity: ${props => (props.solid ? '1 !important' : 0)};
|
||||||
transition: all 100ms ease-in-out;
|
transition: all 100ms ease-in-out;
|
||||||
|
margin-left: 2px;
|
||||||
${props => props.solid && 'polygon { fill: #000};'}
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
transform: scale(1.1);
|
transform: scale(1.1);
|
||||||
|
Reference in New Issue
Block a user