-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.Debounce autoTrim to allow spaces in the middle of input.
2.Fix lint. 3.Migrate to ES6 module.
- Loading branch information
Showing
11 changed files
with
100 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"extends": "airbnb", | ||
"parser": "babel-eslint", | ||
"plugins": [ | ||
"react" | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** | ||
* InputFormField Component Demo for uxcore | ||
* @author eternalsky | ||
* | ||
* Copyright 2015-2016, Uxcore Team, Alinw. | ||
* All rights reserved. | ||
*/ | ||
|
||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import Demo from './InputFormFieldDemo'; | ||
|
||
ReactDOM.render(<Demo />, document.getElementById('UXCoreDemo')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,35 @@ | ||
const classnames = require('classnames'); | ||
const React = require('react'); | ||
import classnames from 'classnames'; | ||
import React from 'react'; | ||
|
||
const FormCount = props => <div | ||
className={classnames(props.prefixCls, { | ||
[`${props.prefixCls}-overflow`]: parseInt(props.length, 10) > parseInt(props.total, 10), | ||
})} | ||
> | ||
<span | ||
className={classnames({ | ||
[`${props.prefixCls}-actual`]: true, | ||
[`${props.prefixCls}-actual-overflow`]: parseInt(props.length, 10) > parseInt(props.total, 10), | ||
const FormCount = props => ( | ||
<div | ||
className={classnames(props.prefixCls, { | ||
[`${props.prefixCls}-overflow`]: parseInt(props.length, 10) > parseInt(props.total, 10), | ||
})} | ||
>{props.length}</span> | ||
<span className={`${props.prefixCls}-slash`}>/</span> | ||
<span className={`${props.prefixCls}-max`}>{props.total}</span> | ||
</div>; | ||
> | ||
<span | ||
className={classnames({ | ||
[`${props.prefixCls}-actual`]: true, | ||
[`${props.prefixCls}-actual-overflow`]: parseInt(props.length, 10) > parseInt(props.total, 10), | ||
})} | ||
>{props.length}</span> | ||
<span className={`${props.prefixCls}-slash`}>/</span> | ||
<span className={`${props.prefixCls}-max`}>{props.total}</span> | ||
</div> | ||
); | ||
|
||
FormCount.defaultProps = { | ||
prefixCls: 'kuma-uxform-count', | ||
}; | ||
|
||
/* eslint-disable react/require-default-props */ | ||
FormCount.propTypes = { | ||
prefixCls: React.PropTypes.string, | ||
length: React.PropTypes.number, | ||
total: React.PropTypes.number, | ||
}; | ||
/* eslint-enable react/require-default-props */ | ||
|
||
FormCount.displayName = 'FormCount'; | ||
|
||
module.exports = FormCount; | ||
export default FormCount; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
* All rights reserved. | ||
*/ | ||
|
||
module.exports = require('./InputFormField'); | ||
export default from './InputFormField'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters