apply margin directly to like & follow (#53)

This commit is contained in:
Danny Skubak 2019-10-30 22:01:38 -04:00 committed by Daniel Ternyak
parent dd9bcb8865
commit 494303883a
4 changed files with 8 additions and 9 deletions

View File

@ -10,6 +10,7 @@ import './index.less';
interface OwnProps {
proposal: ProposalDetail;
style?: React.CSSProperties;
}
interface StateProps {
@ -30,10 +31,11 @@ type State = typeof STATE;
class Follow extends React.Component<Props, State> {
state: State = { ...STATE };
render() {
const { style } = this.props;
const { authedFollows, followersCount } = this.props.proposal;
const { loading } = this.state;
return (
<Input.Group className="Follow" compact>
<Input.Group style={style} className="Follow" compact>
<AuthButton onClick={this.handleFollow}>
<Icon
theme={authedFollows ? 'filled' : 'outlined'}

View File

@ -14,6 +14,7 @@ interface OwnProps {
proposal?: ProposalDetail | null;
comment?: Comment;
rfp?: RFP;
style?: React.CSSProperties;
}
interface StateProps {
@ -38,13 +39,13 @@ class Follow extends React.Component<Props, State> {
render() {
const { likesCount, authedLiked } = this.deriveInfo();
const { proposal, rfp, comment } = this.props;
const { proposal, rfp, comment, style } = this.props;
const { loading } = this.state;
const zoom = comment ? 0.8 : 1;
const shouldShowLikeText = !!proposal || !!rfp;
return (
<Input.Group className="Like" compact style={{ zoom }}>
<Input.Group className="Like" compact style={{ zoom, ...style }}>
<AuthButton onClick={this.handleLike}>
<Icon
theme={authedLiked ? 'filled' : 'outlined'}

View File

@ -103,10 +103,6 @@
& .ant-input-group {
width: inherit
}
& > * + * {
margin-left: 0.5rem;
}
}
}

View File

@ -206,8 +206,8 @@ export class ProposalDetail extends React.Component<Props, State> {
</Button>
</Dropdown>
)}
<Like proposal={proposal} />
<Follow proposal={proposal} />
<Like proposal={proposal} style={{ marginLeft: '0.5rem' }} />
<Follow proposal={proposal} style={{ marginLeft: '0.5rem' }} />
</div>
)}
</div>