react-common-use-components


A library of commonly used React components,Contains the following components: FlexBox, CountDown,InfiniteScroll,Modal,ToastProvider,Toast,Uploader
Install
npm install --save react-common-use-components
or
yarn add react-common-use-components
// in code ES6
import InfiniteScroll from 'react-common-use-components';
// or commonjs
var InfiniteScroll = require('react-common-use-components');
Using
import React, {useState} from 'react';
import FlexBox from "react-common-use-components";
const YourComponent = () => {
const [startTimer, setStartTimer] = useState(false)
const onClick = () => {
setStartTimer(true)
}
return (
<div>
<CountDown style={{
width: "8rem",
height: "1.25rem",
borderRadius: "0.375rem",
textAlign: 'center',
lineHeight: "1.25rem",
fontsize:"1.25rem !important",
marginRight:"0.25rem",
backgroundColor:"#F8F8F8",
color:'#3370DA',
cursor:"pointer"
}} onClick={onClick} status={startTimer}/>
</div>
);
};
export default YourComponent;
CountDown props
name | type | description |
---|
startTimer | boolean | timer switch |
onClick | function | callback function |
style | object | countdown style |
LICENSE
MIT