Merge pull request #10 from Rajakumardev/feature/limit_border_size__issue#8

Limit Border Size 200 (MAX) and content overflow visiblity hidden
This commit is contained in:
Rutik Wankhade 2020-10-08 20:07:37 +05:30 committed by GitHub
commit 2bde6ddc1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -41,7 +41,12 @@ class ConfigCover extends React.Component {
getRandomTheme = (theme, Pattern) => {
this.setState({ bgColor: theme.bgColor, borderColor: theme.bdColor, pattern: Pattern });
}
//this function will set the max border value to 50 if user types a value greater than 50
maxBorderValidationCheck = (e) => {
if(e.target.value > 50) {
e.target.value = 50;
}
}
render() {
return (
<div className="main-container">
@ -118,7 +123,7 @@ class ConfigCover extends React.Component {
<div className="d-flex flex-row">
<div className="input-sm">
<label>Size</label>
<input type="number" className="form-control " value={this.state.borderSize} onChange={(e) => this.setState({ borderSize: e.target.value })} />
<input type="number" max="50" onInput = {this.maxBorderValidationCheck} className="form-control " value={this.state.borderSize} onChange={(e) => this.setState({ borderSize: e.target.value })} />
</div>
<div className="input-sm">

View File

@ -8,7 +8,7 @@
width:800px;
padding:90px;
border-radius:2px;
overflow-y: hidden;
}