Code Monkey home page Code Monkey logo

react-timetable-events's People

Contributors

dependabot[bot] avatar erickarpovits avatar evanwmotte avatar nikolasp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-timetable-events's Issues

Not sure how to work with DefaultProps in this case.

import React, { Component } from 'react';
import moment from 'moment';
import Timetable from 'react-timetable-events'
require('../styles/live_table.css');

export default class LiveTable extends Component{

 
    render(){

        return(
            <div className="livetable_container">
                <Timetable 
                    events={this.props.events}
                    // hoursInterval= {[0,24]}
                />
            </div>
        );
    }
    
}

LiveTable.defaultProps = {
    hoursInterval: [ 2, 24 ],
    timeLabel: 'Time',
    renderHour(hour) {
      return (
        <div className="temp"
             key={hour}>
          { hour  }
        </div>
      )
    }
}


Trying TimeTable.defaultProps, but that is not working too. Can you tell me how to work with this. Great library btw.

How to extend the Event type with custom props

Hey guys,

I hope you are doing great!

I was using this library for some personal project and I couldn't find a proper way to extend the Event interface with some extra custom parameters.

Do you have any suggestion on how to do that ?

Thanks,

customize color for each events

Hi! may I know how to change the color for each event? I've go through the documentation and I still couldn't find a way. Thanks in advance!

Rely on the parent element size instead of the viewport

From what I can see it is not possible to resize the dimensions of the table as a whole.
It relies on the viewport of the root. (it is responsive though ๐Ÿ‘ )

REQUEST:
Would it be possible to rely on the size of the parent element (or to resize the root somehow)?
So if I put this timetable in a div with a fixed size of 800x800px, the table scales accordingly?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.