wideeyes-ui
Advanced tools
Comparing version 2.1.1 to 2.2.0
@@ -136,2 +136,7 @@ const React = require('react') | ||
/> | ||
<TextField | ||
size='sm' | ||
placeholder='This is a placeholder' | ||
containerProps={{style: {marginLeft: '1rem', width: 300}}} | ||
/> | ||
</section> | ||
@@ -138,0 +143,0 @@ <section style={{display: 'flex', marginTop: '2rem'}}> |
import s from './styles.css' | ||
import cn from 'classnames' | ||
import {Button} from '../index' | ||
@@ -9,2 +10,3 @@ import ReactDOM from 'react-dom' | ||
static propTypes = { | ||
size: PropTypes.string, | ||
title: PropTypes.string, | ||
@@ -57,3 +59,9 @@ btnText: PropTypes.element, | ||
const {value} = this.state | ||
const {placeholder, title, btnText, containerProps} = this.props | ||
const { | ||
size, | ||
title, | ||
btnText, | ||
placeholder, | ||
containerProps | ||
} = this.props | ||
@@ -74,3 +82,8 @@ let header = null | ||
{header} | ||
<div style={{position: 'relative', width: '100%'}}> | ||
<div | ||
style={{ | ||
width: '100%', | ||
position: 'relative' | ||
}} | ||
> | ||
<input | ||
@@ -80,12 +93,29 @@ ref='input' | ||
value={value} | ||
className={s.input} | ||
className={cn({ | ||
[s.input]: true, | ||
[s.inputBig]: size && size === 'bg', | ||
[s.inputSmall]: size && size === 'sm' | ||
})} | ||
onChange={this.onChange} | ||
placeholder={placeholder || ''} | ||
/> | ||
<div style={{position: 'absolute', top: 1, right: 1}}> | ||
<Button mode='primary' onClick={this.onSubmit}> | ||
<div | ||
style={{ | ||
top: 1, | ||
right: 1, | ||
position: 'absolute' | ||
}} | ||
> | ||
<Button size={size || null} mode='primary' onClick={this.onSubmit}> | ||
{btnText || 'Submit'} | ||
</Button> | ||
</div> | ||
<div style={{position: 'absolute', top: 11, right: 85, display: value ? 'block' : 'none'}}> | ||
<div | ||
className={cn({ | ||
[s.clearContainer]: true, | ||
[s.clearContainerBig]: size && size === 'bg', | ||
[s.clearContainerSmall]: size && size === 'sm' | ||
})} | ||
style={{display: value ? 'block' : 'none'}} | ||
> | ||
<small> | ||
@@ -92,0 +122,0 @@ <Button mode='link' style={{color: '#ADBED0'}} onClick={this.onClear}> |
{ | ||
"name": "wideeyes-ui", | ||
"version": "2.1.1", | ||
"version": "2.2.0", | ||
"repository": "git@bitbucket.org:wideeyes/new-recognize-demo.git", | ||
@@ -5,0 +5,0 @@ "main": "index.jsx", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24202
615