Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
[fixed] className and style props being applied in multiple places
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Sep 13, 2015
1 parent c8f8281 commit a7dc435
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"babel-plugin-object-assign": "^1.2.1",
"chai": "^3.2.0",
"chance": "^0.7.6",
"cpy": "^3.4.1",
"css-loader": "^0.15.6",
"es5-shim": "^4.1.7",
"eslint": "^0.24.0",
Expand Down
12 changes: 8 additions & 4 deletions src/Calendar.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { PropTypes } from 'react';
import uncontrollable from 'uncontrollable';

import cn from 'classnames';
import {
accessor
, elementType
Expand Down Expand Up @@ -210,7 +210,10 @@ let Calendar = React.createClass({
, culture
, components = {}
, formats = {}
, date: current } = this.props;
, style
, className
, date: current
, ...props } = this.props;

formats = defaultFormats(formats)

Expand All @@ -226,7 +229,8 @@ let Calendar = React.createClass({

return (
<div {...elementProps}
className='rbc-calendar'
className={cn('rbc-calendar', className)}
style={style}
>
{ toolbar &&
<Toolbar
Expand All @@ -240,7 +244,7 @@ let Calendar = React.createClass({
}
<View
ref='view'
{...this.props}
{...props}
{...formats}
formats={undefined}
events={events}
Expand Down

0 comments on commit a7dc435

Please sign in to comment.