Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support classname for legend #223

Merged
merged 3 commits into from Jan 12, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/lib/legends/discrete-color-legend.js
Expand Up @@ -57,11 +57,11 @@ function fillItemsWithDefaults(items) {
}

function DiscreteColorLegend({items: initialItems, width, height,
onItemClick, orientation}) {
onItemClick, orientation, className = ''}) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to add this into the PropTypes as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure thing

const updatedItems = fillItemsWithDefaults(initialItems);
return (
<div
className={`rv-discrete-color-legend ${orientation}`}
className={`rv-discrete-color-legend ${orientation} ${className}`}
style={{width, height}}>
{updatedItems.map((item, i) =>
<DiscreteColorLegendItem
Expand Down