mirror of
https://github.com/bobwen-dev/react-templates
synced 2025-04-12 00:56:39 +02:00
Merge pull request #36 from liady/gh-pages-htmlfor
support "for" attribute in react templates
This commit is contained in:
commit
dbec6dc6b1
@ -78,7 +78,7 @@ var reactSupportedAttributes = ['accept', 'acceptCharset', 'accessKey', 'action'
|
||||
'max', 'maxLength', 'media', 'mediaGroup', 'method', 'min', 'multiple', 'muted', 'name', 'noValidate', 'open', 'pattern', 'placeholder', 'poster', 'preload', 'radioGroup', 'readOnly', 'rel',
|
||||
'required', 'role', 'rows', 'rowSpan', 'sandbox', 'scope', 'scrolling', 'seamless', 'selected', 'shape', 'size', 'sizes', 'span', 'spellCheck', 'src', 'srcDoc', 'srcSet', 'start', 'step',
|
||||
'style', 'tabIndex', 'target', 'title', 'type', 'useMap', 'value', 'width', 'wmode'];
|
||||
var attributesMapping = {'class': 'className', 'rt-class': 'className'};
|
||||
var attributesMapping = {'class': 'className', 'rt-class': 'className', 'for': 'htmlFor'};
|
||||
_.forEach(reactSupportedAttributes, function (attributeReactName) {
|
||||
if (attributeReactName !== attributeReactName.toLowerCase()) {
|
||||
attributesMapping[attributeReactName.toLowerCase()] = attributeReactName;
|
||||
|
Loading…
x
Reference in New Issue
Block a user