Git Product home page Git Product logo

Comments (10)

edwardfxiao avatar edwardfxiao commented on June 14, 2024 1

Check this out https://codesandbox.io/s/846nqnp6j0

The key is to change css.

.react-inputs-validation__textbox__input___20hDL.react-inputs-validation__error___2aXSp {
  border: none !important;
  border-bottom: 1px solid #f44336 !important;
  border-bottom-width: 1px !important;
  border-bottom-style: solid !important;
  border-bottom-color: rgb(244, 67, 54) !important;
  -webkit-box-shadow: 0 1px 0 0 #f44336 !important;
  box-shadow: 0 1px 0 0 #f44336 !important;
}

As for Icon issue, I don't really know what problem it is.

from react-inputs-validation.

edwardfxiao avatar edwardfxiao commented on June 14, 2024 1

for problem two, customStyleInput={{paddingLeft: '30px'}}should fix

from react-inputs-validation.

edwardfxiao avatar edwardfxiao commented on June 14, 2024 1

But I don't understand what you mean for the first problem.

"1. the label text color which probably should get fix by working on this CSS:" means its solved?

from react-inputs-validation.

edwardfxiao avatar edwardfxiao commented on June 14, 2024 1

Ok I see, but I think the only way to fix this is to config yourself, give it classNameWrapper="react-inputs-validation-validate"

and

.react-inputs-validation-validate {
  margin-left: 3rem;
  width: 92%;
  width: calc(100% - 3rem);
}

from react-inputs-validation.

kiano0sh avatar kiano0sh commented on June 14, 2024

thanks for answer but i think i have a better solution for the problem with red line and text massage color here is my sample code: https://codesandbox.io/s/zkk8wxn2z4
but there are two problem right now:

  1. the label text color which probably should get fix by working on this CSS:
/* label focus color */
.input-field input[type=text].react-inputs-validation__error___2aXSp:focus + label {
    color: #F44336 !important;
}
  1. the icon problem as you can see in my sample code.

from react-inputs-validation.

kiano0sh avatar kiano0sh commented on June 14, 2024

for better understanding of icon problem please go to the Icon Prefixes part of this link: https://materializecss.com/text-inputs.html
no it means the CSS is not perfect but the solution should be something like that!

from react-inputs-validation.

kiano0sh avatar kiano0sh commented on June 14, 2024

@edwardfhsiao Alright that's nice thanks for help.
if anyone was facing this problem: https://codesandbox.io/s/zkk8wxn2z4

from react-inputs-validation.

edwardfxiao avatar edwardfxiao commented on June 14, 2024

@kiano0sh I updated the version 2.1.7 and check this agian https://codesandbox.io/s/846nqnp6j0.
its a rough idea of how to implement the label thing

from react-inputs-validation.

kiano0sh avatar kiano0sh commented on June 14, 2024

@edwardfhsiao Good job but there should be an easier way to do this if i found any i will inform you.

from react-inputs-validation.

edwardfxiao avatar edwardfxiao commented on June 14, 2024

I am closing this issue now as the structure of this library is not designed to be compatible with material design components specifically.

from react-inputs-validation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.