@@ -10,6 +10,7 @@ const ReCAPTCHA = React.createClass({
1010 type : PropTypes . oneOf ( [ "image" , "audio" ] ) ,
1111 tabindex : PropTypes . number ,
1212 onExpired : PropTypes . func ,
13+ size : PropTypes . oneOf ( [ "compact" , "normal" ] ) ,
1314 } ,
1415
1516 getInitialState ( ) {
@@ -21,6 +22,7 @@ const ReCAPTCHA = React.createClass({
2122 theme : "light" ,
2223 type : "image" ,
2324 tabindex : 0 ,
25+ size : "normal" ,
2426 } ;
2527 } ,
2628
@@ -55,6 +57,7 @@ const ReCAPTCHA = React.createClass({
5557 type : this . props . type ,
5658 tabindex : this . props . tabindex ,
5759 "expired-callback" : this . handleExpired ,
60+ size : this . props . size ,
5861 } ) ;
5962 this . setState ( {
6063 widgetId : id ,
@@ -73,7 +76,7 @@ const ReCAPTCHA = React.createClass({
7376 render ( ) {
7477 // consume properties owned by the reCATPCHA, pass the rest to the div so the user can style it.
7578 /* eslint-disable no-unused-vars */
76- let { sitekey, onChange, theme, type, tabindex, onExpired, ...childProps } = this . props ;
79+ let { sitekey, onChange, theme, type, tabindex, onExpired, size , ...childProps } = this . props ;
7780 /* eslint-enable no-unused-vars */
7881 return (
7982 < div { ...childProps } ref = { ( component ) => { this . captcha = component ; } } />
0 commit comments