Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Commit

Permalink
evaluate styles
Browse files Browse the repository at this point in the history
  • Loading branch information
BotScutters committed May 2, 2018
1 parent d601b14 commit 2afd661
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/victory-primitives/whisker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from "react";
import PropTypes from "prop-types";
import CommonProps from "./common-props";
import Helpers from "../victory-util/helpers";
import Line from "./line";
import { assign } from "lodash";

Expand Down Expand Up @@ -31,8 +32,9 @@ export default class Whisker extends React.Component {

render() {
const {
groupComponent, lineComponent, style, events, className, majorWhisker, minorWhisker
groupComponent, lineComponent, events, className, majorWhisker, minorWhisker, datum, active
} = this.props;
const style = Helpers.evaluateStyle(this.props.style, datum, active);
const baseProps = { style, events, className };
return React.cloneElement(groupComponent, {}, [
React.cloneElement(lineComponent, assign({ key: "major-whisker" }, baseProps, majorWhisker)),
Expand Down

0 comments on commit 2afd661

Please sign in to comment.