Skip to content

Commit f3b824f

Browse files
authored
Merge pull request #199 from CTEH/master
pass props through to Badge
2 parents 1e80f87 + 3e5c827 commit f3b824f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.storybook/__storyshots__/Badge.shot

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ exports[`Default`] = `
5757
<div>
5858
<div>
5959
<span
60-
className="slds-badge">
60+
className="slds-badge"
61+
onClick={[Function]}>
6162
Badge Label
6263
</span>
6364
</div>

src/scripts/Badge.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import React, { PropTypes } from 'react';
22
import classnames from 'classnames';
33

4-
const Badge = ({ children, type, label }) => {
4+
const Badge = ({ children, type, label, ...props }) => {
55
const typeClassName = type ? `slds-theme--${type}` : null;
66
const badgeClassNames = classnames(
77
'slds-badge',
88
typeClassName
99
);
1010
return (
11-
<span className={ badgeClassNames }>
11+
<span className={ badgeClassNames } {...props}>
1212
{ label || children }
1313
</span>
1414
);

0 commit comments

Comments
 (0)