]>
cat aescling's git repositories - mastodon.git/blob - app/javascript/mastodon/features/compose/components/warning.js
1 import React
from 'react';
2 import PropTypes
from 'prop-types';
3 import Motion
from '../../ui/util/optional_motion';
4 import spring
from 'react-motion/lib/spring';
6 export default class Warning
extends React
.PureComponent
{
9 message: PropTypes
.node
.isRequired
,
13 const { message
} = this.props
;
16 <Motion defaultStyle
={{ opacity: 0, scaleX: 0.85, scaleY: 0.75 }} style
={{ opacity: spring(1, { damping: 35, stiffness: 400 }), scaleX: spring(1, { damping: 35, stiffness: 400 }), scaleY: spring(1, { damping: 35, stiffness: 400 }) }}>
17 {({ opacity
, scaleX
, scaleY
}) => (
18 <div className
='compose-form__warning' style
={{ opacity: opacity
, transform: `scale(${scaleX}, ${scaleY})` }}>
This page took 0.106538 seconds and 4 git commands to generate.