mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-27 16:11:37 +01:00
Appease Travis
This commit is contained in:
parent
769f62d96f
commit
36a35be2ad
2 changed files with 23 additions and 8 deletions
|
@ -97,13 +97,13 @@ export default class StatusHeader extends React.PureComponent {
|
||||||
className='status__avatar'
|
className='status__avatar'
|
||||||
onClick={this.handleAccountClick}
|
onClick={this.handleAccountClick}
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
friend ? (
|
friend ? (
|
||||||
<AvatarOverlay account={account} friend={friend} />
|
<AvatarOverlay account={account} friend={friend} />
|
||||||
) : (
|
) : (
|
||||||
<Avatar account={account} size={48} />
|
<Avatar account={account} size={48} />
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
href={account.get('url')}
|
href={account.get('url')}
|
||||||
|
|
|
@ -73,8 +73,23 @@ export default class IconButton extends React.PureComponent {
|
||||||
classes.push(this.props.className);
|
classes.push(this.props.className);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const flipDeg = this.props.flip ? -180 : -360;
|
||||||
|
const rotateDeg = this.props.active ? flipDeg : 0;
|
||||||
|
|
||||||
|
const motionDefaultStyle = {
|
||||||
|
rotate: rotateDeg,
|
||||||
|
};
|
||||||
|
|
||||||
|
const springOpts = {
|
||||||
|
stiffness: this.props.flip ? 60 : 120,
|
||||||
|
damping: 7,
|
||||||
|
};
|
||||||
|
const motionStyle = {
|
||||||
|
rotate: this.props.animate ? spring(rotateDeg, springOpts) : 0,
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Motion defaultStyle={{ rotate: this.props.active ? (this.props.flip ? -180 : -360) : 0 }} style={{ rotate: this.props.animate ? spring(this.props.active ? (this.props.flip ? -180 : -360) : 0, { stiffness: this.props.flip ? 60 : 120, damping: 7 }) : 0 }}>
|
<Motion defaultStyle={motionDefaultStyle} style={motionStyle}>
|
||||||
{({ rotate }) =>
|
{({ rotate }) =>
|
||||||
<button
|
<button
|
||||||
aria-label={this.props.title}
|
aria-label={this.props.title}
|
||||||
|
|
Loading…
Reference in a new issue