- I am trying to style my place holder
- instead of using css I am using JSS.
so I googled and found this link Styling the placeholder in a TextField
I tried with !important too but its not working.
- can you tell me how to fix it.
- providing my code snippet and sandbox below
https://codesandbox.io/s/react-codesandboxer-example-ntz22
const styles = theme => ({
input: {
// padding: 0,
"&::placeholder": {
// fontSize: '14 !important',
color: "blue !important"
}
}
});
class SingleSelect extends Component<*, State> {
state = {
isClearable: true,
isDisabled: false,
isLoading: false,
isRtl: false,
isSearchable: true
};
toggleClearable = () =>
this.setState(state => ({ isClearable: !state.isClearable }));
toggleDisabled = () =>
this.setState(state => ({ isDisabled: !state.isDisabled }));
toggleLoading = () =>
this.setState(state => ({ isLoading: !state.isLoading }));
toggleRtl = () => this.setState(state => ({ isRtl: !state.isRtl }));
toggleSearchable = () =>
this.setState(state => ({ isSearchable: !state.isSearchable }));
render() {
const {
isClearable,
isSearchable,
isDisabled,
isLoading,
isRtl
} = this.state;
return (
<Fragment>
<Select
className="basic-single"
classNamePrefix="select"
// defaultValue={colourOptions[0]}
isDisabled={isDisabled}
isLoading={isLoading}
isClearable={isClearable}
isRtl={isRtl}
isSearchable={isSearchable}
name="color"
options={colourOptions}
placeholder={"2 testing here."}
/>
</Fragment>