2.0.5 • Published 2 years ago

@jswork/react-calendar-graph v2.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

react-calendar-graph

Calendar graph like github for react.

version license size download

installation

npm install -S @jswork/react-calendar-graph

usage

  1. import css

    @import "~@jswork/react-calendar-graph/dist/style.css";
    
    // or use sass
    @import "~@jswork/react-calendar-graph/dist/style.scss";
    
    // customize your styles:
    $react-calendar-graph-options: ()
  2. import js

    import React, { useEffect, useState } from 'react';
    import ReactCalendarGraph from '../../src/main';
    import '../../src/components/style.scss';
    import styled from 'styled-components';
    
    // @ts-ignore
    import data from './data.json';
    
    const Container = styled.div`
      width: 80%;
      margin: 30px auto 0;
      .react-calendar-graph {
        width: 90%;
      }
    `;
    
    export default () => {
      const [v, setV] = useState([]);
      useEffect(() => {
        setTimeout(() => {
          setV(data);
        }, 100);
      }, []);
      return (
        <Container>
          <ReactCalendarGraph data={v} />
        </Container>
      );
    };

preview

license

Code released under the MIT license.

1.0.5

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.1

2 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago