79193147

Date: 2024-11-15 16:14:38
Score: 1
Natty:
Report link

I faced the same error as @Attila Gyén with the icon field when using the ToggleMask, but there's another way to solve the same thing without going directly to the .p-icon-field class by using the passthrough options offered by primereact:

 <Password
        pt={{
          iconField: {
            root: {
              style: { width: "100%" },
            },
          },
          input: {
            style: { width: "100%" },
          },
          root: {
            style: { width: "100%" },
          },
        }}
      />

Remember this code my seem complex, but it lets you customize the classes already given by primereact in your JSX / TSX side of the code.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Attila
  • Low reputation (1):
Posted by: BearCoding