question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[TextField] Color prop accepts limited options

See original GitHub issue

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

When trying to set the Textfield color property to “primary.dark” or “secondary.light” it breaks the entire component. Currently it is only limited to one level deep in the theme palette like “primary” or “secondary” which is very limiting to like 4 colors. Plus I cant find any other way to get the same requirement.

Expected behavior 🤔

The Textfield color property should accept values from more than one level deep in the theme palette.

Steps to reproduce 🕹

https://codesandbox.io/s/stoic-sea-y6jw63?file=/src/Demo.tsx

Context 🔦

No response

Your environment 🌎

`npx @mui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

I am using chrome Version 99.0.4844.51 System: OS: Windows 10 10.0.19042 Binaries: Node: 16.13.0 - C:\Program Files\nodejs\node.EXE Yarn: Not Found npm: 8.3.0 - C:\Program Files\nodejs\npm.CMD Browsers: Chrome: Not Found Edge: Spartan (44.19041.1266.0), Chromium (99.0.1150.30) npmPackages: @emotion/react: ^11.8.1 => 11.8.1 @emotion/styled: ^11.8.1 => 11.8.1 @mui/base: 5.0.0-alpha.70 @mui/icons-material: ^5.4.4 => 5.4.4 @mui/material: ^5.4.4 => 5.4.4 @mui/private-theming: 5.4.4 @mui/styled-engine: 5.4.4 @mui/styles: ^5.4.4 => 5.4.4 @mui/system: 5.4.4 @mui/types: 7.1.2 @mui/utils: 5.4.4 @types/react: 17.0.39 react: ^17.0.2 => 17.0.2 react-dom: ^17.0.2 => 17.0.2 typescript: 4.6.2

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mostafa-gadocommented, Mar 15, 2022

Thanks a lot man.

We could use that documentation improvement as a condition to close this issue, I guess it makes a lot of sense.

Do whatever you see fit.

0reactions
danilo-lealcommented, Mar 14, 2022

There you go.

We could use that documentation improvement as a condition to close this issue, I guess it makes a lot of sense.

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - Material UI + Typescript: Types of property 'color' are ...
and I noticed they were importing from a different library. The one from @material-ui/core is incompatible for some reason. // import TextField ......
Read more >
<input type="color"> - HTML: HyperText Markup Language
Using color inputs. Inputs of type color are simple, due to the limited number of attributes they support. Providing a default color.
Read more >
TextField API - Material UI - MUI
Name Type Default autoComplete string autoFocus bool false classes object
Read more >
Text fields - Components - Material Design
Fill a field with default input text. Pressing the return button accepts the current autocomplete suggestion. ... Reduce the opacity of suggested text,...
Read more >
Text in Compose - Jetpack - Android Developers
At a higher level, Compose provides Text and TextField , which are composables ... You are not limited to this particular color scheme...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found