apply margin directly to like & follow (#53)
This commit is contained in:
parent
dd9bcb8865
commit
494303883a
|
@ -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'}
|
||||
|
|
|
@ -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'}
|
||||
|
|
|
@ -103,10 +103,6 @@
|
|||
& .ant-input-group {
|
||||
width: inherit
|
||||
}
|
||||
|
||||
& > * + * {
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue