You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
347 B
TypeScript
19 lines
347 B
TypeScript
import * as React from 'react';
|
|
import { pure } from 'recompose';
|
|
|
|
import './withSpin.css';
|
|
|
|
const withSpin = (Component: any) => {
|
|
return pure((_props: any) => {
|
|
const {
|
|
spin,
|
|
...props,
|
|
} = _props;
|
|
return (
|
|
<Component {...props} className={spin ? 'withSpin-spin' : ''} />
|
|
);
|
|
});
|
|
};
|
|
|
|
export default withSpin;
|