The code powering m.abunchtell.com https://m.abunchtell.com
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 

27 líneas
841 B

  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';
  5. export default class Warning extends React.PureComponent {
  6. static propTypes = {
  7. message: PropTypes.node.isRequired,
  8. };
  9. render () {
  10. const { message } = this.props;
  11. return (
  12. <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 }) }}>
  13. {({ opacity, scaleX, scaleY }) => (
  14. <div className='compose-form__warning' style={{ opacity: opacity, transform: `scale(${scaleX}, ${scaleY})` }}>
  15. {message}
  16. </div>
  17. )}
  18. </Motion>
  19. );
  20. }
  21. }