Skip to content

Commit 85efc24

Browse files
committed
accept className prop
1 parent 9dac83a commit 85efc24

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/google.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default class Google extends React.Component {
88

99
render() {
1010
return (
11-
<ins className="adsbygoogle"
11+
<ins className={`${this.props.className} adsbygoogle`}
1212
style={this.props.style}
1313
data-ad-client={this.props.client}
1414
data-ad-slot={this.props.slot}
@@ -18,13 +18,15 @@ export default class Google extends React.Component {
1818
};
1919

2020
Google.propTypes = {
21+
className: PropTypes.string,
2122
style: PropTypes.object, // eslint-disable-line
2223
client: PropTypes.string.isRequired,
2324
slot: PropTypes.string.isRequired,
2425
format: PropTypes.string,
2526
};
2627

2728
Google.defaultProps = {
29+
className: '',
2830
style: {display: 'block'},
2931
format: 'auto',
3032
};

0 commit comments

Comments
 (0)