From ceed8ae2ebd8f5b87fc6af5d0fb4d30be24c51f0 Mon Sep 17 00:00:00 2001 From: Pixelastic Date: Mon, 7 Sep 2015 14:29:06 +0200 Subject: [PATCH] feat: Add `htmlAttributes` to indexSelector --- components/IndexSelector.js | 11 ++++++++--- example/app.js | 5 ++++- widgets/index-selector.js | 7 +++---- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/components/IndexSelector.js b/components/IndexSelector.js index 2b73e9303c..fdec5582c0 100644 --- a/components/IndexSelector.js +++ b/components/IndexSelector.js @@ -8,11 +8,16 @@ class IndexSelector extends React.Component { render() { var currentIndex = this.props.currentIndex; var indices = this.props.indices; - var cssClass = this.props.cssClass; + var htmlAttributes = this.props.htmlAttributes; + // React needs `className` in place of `class` + if (htmlAttributes.class) { + htmlAttributes.className = htmlAttributes.class; + htmlAttributes.class = null; + } return (