Skip to content

Commit

Permalink
Use camelCase SVG attributes. (#8590)
Browse files Browse the repository at this point in the history
Avoids two “Unknown DOM property” warnings when displaying sharing
options in `my-sites/sharing`.

See
https://facebook.github.io/react/docs/tags-and-attributes.html#svg-attri
butes
See #5950.
  • Loading branch information
obenland authored Oct 7, 2016
1 parent 1e1921d commit 81e4973
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/components/social-logo/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default React.createClass( {
svg = <svg className={ iconClass } height={ this.props.size } width={ this.props.size } onClick={ this.props.onClick } xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M12 6.134L6.07 9.797 2 6.54l5.883-3.843L12 6.134zm-10 6.92l5.883 3.843L12 13.46 6.07 9.796 2 13.054zm10 .405l4.116 3.438L22 13.054l-4.07-3.257L12 13.46zm10-6.92l-5.884-3.843L12 6.134l5.93 3.663L22 6.54zm-9.99 7.66l-4.128 3.426-1.767-1.153v1.29l5.896 3.54 5.898-3.54v-1.29l-1.77 1.153-4.127-3.426z"/></g></svg>;
break;
case 'eventbrite':
svg = <svg className={ iconClass } height={ this.props.size } width={ this.props.size } onClick={ this.props.onClick } xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M18.04 3.93L5.96 3C4.324 3 3 4.325 3 5.96V18.04C3 19.675 4.325 21 5.96 21l12.082-.93C19.7 19.982 21 18.743 21 17.11V6.89c0-1.634-1.26-2.863-2.96-2.96zm-1.107 4.24c-.082.215-.192.432-.378.55-.188.123-.49.133-.8.133-1.52 0-3.06-.048-4.606-.048-.153.708-.305 1.416-.452 2.128.932-.004 1.873.005 2.81.005.726 0 1.462-.07 1.586.525.04.19 0 .426-.052.615-.105.38-.258.676-.625.783-.185.055-.408.06-.646.06-1.144 0-2.344.016-3.492.02-.17.77-.328 1.552-.49 2.332 1.57-.005 3.068-.04 4.634-.058.627-.007 1.085.194 1.01.85-.032.262-.1.497-.212.725-.102.207-.248.375-.488.45-.237.076-.54.065-.862.08-.304.013-.614.007-.924.015-.31.01-.62.022-.92.022-1.252 0-2.428.08-3.682.073-.603-.004-1.014-.25-1.124-.757-.06-.273-.018-.58.036-.84.54-2.593 1.083-5.177 1.63-7.764.055-.266.113-.512.224-.715.17-.304.424-.52.79-.62.368-.1.883-.047 1.344-.047.305 0 .612.008.914.016.925.026 1.817.03 2.747.053.304.007.615.016.915.016.62 0 1.17.073 1.245.614.04.288-.05.567-.132.783z" fill-rule="evenodd" clip-rule="evenodd"/></g></svg>;
svg = <svg className={ iconClass } height={ this.props.size } width={ this.props.size } onClick={ this.props.onClick } xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M18.04 3.93L5.96 3C4.324 3 3 4.325 3 5.96V18.04C3 19.675 4.325 21 5.96 21l12.082-.93C19.7 19.982 21 18.743 21 17.11V6.89c0-1.634-1.26-2.863-2.96-2.96zm-1.107 4.24c-.082.215-.192.432-.378.55-.188.123-.49.133-.8.133-1.52 0-3.06-.048-4.606-.048-.153.708-.305 1.416-.452 2.128.932-.004 1.873.005 2.81.005.726 0 1.462-.07 1.586.525.04.19 0 .426-.052.615-.105.38-.258.676-.625.783-.185.055-.408.06-.646.06-1.144 0-2.344.016-3.492.02-.17.77-.328 1.552-.49 2.332 1.57-.005 3.068-.04 4.634-.058.627-.007 1.085.194 1.01.85-.032.262-.1.497-.212.725-.102.207-.248.375-.488.45-.237.076-.54.065-.862.08-.304.013-.614.007-.924.015-.31.01-.62.022-.92.022-1.252 0-2.428.08-3.682.073-.603-.004-1.014-.25-1.124-.757-.06-.273-.018-.58.036-.84.54-2.593 1.083-5.177 1.63-7.764.055-.266.113-.512.224-.715.17-.304.424-.52.79-.62.368-.1.883-.047 1.344-.047.305 0 .612.008.914.016.925.026 1.817.03 2.747.053.304.007.615.016.915.016.62 0 1.17.073 1.245.614.04.288-.05.567-.132.783z" fillRule="evenodd" clipRule="evenodd"/></g></svg>;
break;
case 'facebook':
svg = <svg className={ iconClass } height={ this.props.size } width={ this.props.size } onClick={ this.props.onClick } xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M20.007 3H3.993C3.445 3 3 3.445 3 3.993v16.013c0 .55.445.994.993.994h8.62v-6.97H10.27V11.31h2.346V9.31c0-2.325 1.42-3.59 3.494-3.59.993 0 1.847.073 2.096.106v2.43h-1.438c-1.128 0-1.346.537-1.346 1.324v1.734h2.69l-.35 2.717h-2.34V21h4.587c.548 0 .993-.445.993-.993V3.993c0-.548-.445-.993-.993-.993z"/></g></svg>;
Expand Down Expand Up @@ -99,7 +99,7 @@ export default React.createClass( {
svg = <svg className={ iconClass } height={ this.props.size } width={ this.props.size } onClick={ this.props.onClick } xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2zm-1.92 14.05c-2.235 0-4.05-1.814-4.05-4.05s1.815-4.05 4.05-4.05c1.095 0 2.01.4 2.71 1.057l-1.15 1.118c-.292-.275-.802-.6-1.56-.6-1.34 0-2.433 1.115-2.433 2.48s1.094 2.48 2.434 2.48c1.552 0 2.123-1.074 2.228-1.71h-2.232v-1.51h3.79c.058.255.102.494.102.83 0 2.312-1.55 3.956-3.887 3.956zm8.92-3.3h-1.25V14h-1.5v-1.25H15v-1.5h1.25V10h1.5v1.25H19v1.5z"/></g></svg>;
break;
case 'instagram':
svg = <svg className={ iconClass } height={ this.props.size } width={ this.props.size } onClick={ this.props.onClick } xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M18.924 10.615h-1.567c.114.443.182.906.182 1.385 0 3.06-2.48 5.54-5.54 5.54-3.058 0-5.537-2.48-5.537-5.54 0-.48.068-.942.182-1.385h-1.57v7.616c0 .383.31.693.694.693h12.46c.383 0 .693-.31.693-.692v-7.615zm0-4.846c0-.383-.31-.693-.693-.693h-2.075c-.382 0-.692.31-.692.692v2.076c0 .382.31.692.692.692h2.076c.384 0 .694-.31.694-.692V5.77zM12 8.537c-1.912 0-3.462 1.55-3.462 3.46 0 1.913 1.55 3.463 3.462 3.463s3.462-1.55 3.462-3.46c0-1.912-1.55-3.462-3.462-3.462M18.924 21H5.076C3.93 21 3 20.07 3 18.922V5.077C3 3.93 3.93 3 5.076 3h13.847C20.07 3 21 3.93 21 5.077v13.846C21 20.07 20.07 21 18.924 21" fill-rule="evenodd" clip-rule="evenodd"/></g></svg>;
svg = <svg className={ iconClass } height={ this.props.size } width={ this.props.size } onClick={ this.props.onClick } xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M18.924 10.615h-1.567c.114.443.182.906.182 1.385 0 3.06-2.48 5.54-5.54 5.54-3.058 0-5.537-2.48-5.537-5.54 0-.48.068-.942.182-1.385h-1.57v7.616c0 .383.31.693.694.693h12.46c.383 0 .693-.31.693-.692v-7.615zm0-4.846c0-.383-.31-.693-.693-.693h-2.075c-.382 0-.692.31-.692.692v2.076c0 .382.31.692.692.692h2.076c.384 0 .694-.31.694-.692V5.77zM12 8.537c-1.912 0-3.462 1.55-3.462 3.46 0 1.913 1.55 3.463 3.462 3.463s3.462-1.55 3.462-3.46c0-1.912-1.55-3.462-3.462-3.462M18.924 21H5.076C3.93 21 3 20.07 3 18.922V5.077C3 3.93 3.93 3 5.076 3h13.847C20.07 3 21 3.93 21 5.077v13.846C21 20.07 20.07 21 18.924 21" fillRule="evenodd" clipRule="evenodd"/></g></svg>;
break;
case 'linkedin':
svg = <svg className={ iconClass } height={ this.props.size } width={ this.props.size } onClick={ this.props.onClick } xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g><path d="M19.7 3H4.3C3.582 3 3 3.582 3 4.3v15.4c0 .718.582 1.3 1.3 1.3h15.4c.718 0 1.3-.582 1.3-1.3V4.3c0-.718-.582-1.3-1.3-1.3zM8.34 18.338H5.666v-8.59H8.34v8.59zM7.003 8.574c-.857 0-1.55-.694-1.55-1.548 0-.855.692-1.548 1.55-1.548.854 0 1.547.694 1.547 1.548 0 .855-.692 1.548-1.546 1.548zm11.335 9.764h-2.67V14.16c0-.995-.017-2.277-1.387-2.277-1.39 0-1.6 1.086-1.6 2.206v4.248h-2.668v-8.59h2.56v1.174h.036c.357-.675 1.228-1.387 2.527-1.387 2.703 0 3.203 1.78 3.203 4.092v4.71z"/></g></svg>;
Expand Down

0 comments on commit 81e4973

Please sign in to comment.