Comments (11)
Can you provide an example that you wish to modify?
Normally you can achieve that by providing the following props
<Textbox
classNameInput="myCustomInputClass"
classNameWrapper="myCustomWrapperClass"
classNameContainer="myCustomContainerClass"
customStyleInput={{ paddingTop: '0', paddingBottom: '0', height: '50px', paddingLeft: '20px', paddingRight: '20px', border: 'none' }}
customStyleWrapper={{padding: '2px'}}
customStyleContainer={{padding: '3px'}}
/>
if you find something that cannot be done by those props, you can overwrite it directly from css.
e.g.
.myCustomWrapperClass input[type='text'].react-inputs-validation__textbox__input___20hDL{
border-radius: 40px !important;
border-color: transparent !important;
}
One more example
<div>
<div>
<Textbox
tabIndex="1"
id=""
customStyleWrapper={{ height: '100%' }}
customStyleContainer={{ height: '100%' }}
customStyleInput={
{
paddingTop: '0',
paddingBottom: '0',
height: '45px',
paddingLeft: '20px',
paddingRight: '0px',
border: 'none',
textAlign: 'right'
}
}
value={name}
type={`text`}
placeholder="enter the name"
onChange={this.handleNameChange}
onBlur={() => {}}
validationOption={{
check: false
}}
/>
</div>
<div className="border" />
<div>
<Textbox
tabIndex="2"
id=""
customStyleWrapper={{ height: '100%' }}
customStyleContainer={{ height: '100%' }}
customStyleInput={
{
paddingTop: '0',
paddingBottom: '0',
height: '45px',
paddingLeft: '20px',
paddingRight: '0px',
border: 'none',
textAlign: 'right'
}
}
value={title}
type={`text`}
placeholder="enter the title"
onChange={this.handleTitleChange}
onBlur={() => {}}
validationOption={{
check: false
}}
/>
</div>
<div className="border" />
</div>
from react-inputs-validation.
This is what I was looking for, thank you.
from react-inputs-validation.
Hi Guys :)
Firstly, thanks for the great library! Its really helped me to get some validations implemented on my forms. I was trying to update the width of the "Textbox" and "Select" components so that they don't stretch across the entire screen as seen below:
Can you please guide me on where the best place is to update the width/CSS so that for example the two elements can sit side by side?
Thanks.
from react-inputs-validation.
So I got the width of each element to scale down using the CSS elements seen below (including removing one of the borders), but I can't get them to be inline with one another? Do you guys have any suggestions with respect to that?
`.react-inputs-validation__textbox__wrapper___3tnXv{
width: 15em !important;
}
.react-inputs-validation__select__wrapper___1B4OH{
width: 15em !important;
}
.react-inputs-validation__msg___pxv8o .react-inputs-validation__error___2aXSp {
padding: 0% !important;
position: relative;
border: 0px solid #e5e5e5 !important;
box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);
}
.react-inputs-validation__select__container___3jgUR {
padding: 0% !important;
position: relative;
border: 0px solid #e5e5e5 !important;
/box-shadow: inset 0 1px 1px rgba(0,0,0,0.075);/
}`
from react-inputs-validation.
why don't you wrap Components inside a div? So that you can manipulate the with of the Textbox by manipulating its parent
maybe something like this
https://codesandbox.io/s/mo6y614v88
from react-inputs-validation.
Thanks @edwardfhsiao :) I was actually looking at doing something like this with the bootstrap libraries as well - I got to the same point i.e. where the boxes were centered underneath one another. Your way is simpler though, so I have adopted that :)
Is there a way to put the "input" and "dropdown" boxes next to each other? Something like:
"Place your name here ^-^" "US ⌄"
Instead of the current:
"Place your name here ^-^"
"US ⌄"
It seems like there is a "break" between the two components that I can't get rid of?
from react-inputs-validation.
you want dropdown to be inside the input or just line up next to the input ?
from react-inputs-validation.
Hi @edwardfhsiao,
Apologies for the confusion on my end. I would like to get them to align to one another as in the "mock" view below that I edited from your code sandbox above:
from react-inputs-validation.
@MRMTC https://codesandbox.io/s/mo6y614v88, you can always play around those CSS
from react-inputs-validation.
Awesome stuff, thanks so much @edwardfhsiao :) I hope you have a great week ahead!
from react-inputs-validation.
@MRMTC my pleasure
from react-inputs-validation.
Related Issues (20)
- Issue with Option list without Default Select option HOT 2
- validationOption.custom HOT 2
- Can not search option if try to type HOT 6
- Remove error message HOT 1
- Checkbox - checked property HOT 4
- Remove error message when value of field is updated HOT 1
- use along with materializecss
- use along with materializecss HOT 10
- Remove the default tabindex -1 HOT 3
- I get the error invariant violation View config not found HOT 4
- IE 11 SCRIPT1003: Expected ':' HOT 17
- Validation issue with Select component HOT 3
- Improve TypeScript support HOT 9
- There is a requirement that requires me to add a link into the message on error HOT 5
- Can you have maxLength also as an option? HOT 3
- CSS style custom validation message HOT 2
- Custom message for empty textbox HOT 3
- Issue with Select component HOT 2
- dependencies? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-inputs-validation.