Giter Club home page Giter Club logo

Comments (4)

Rutger-Knijnenburg avatar Rutger-Knijnenburg commented on August 20, 2024 1

@viclafouch Works like a charm ;) Sorry for the late response, and thanks for your fix!!

from mui-color-input.

viclafouch avatar viclafouch commented on August 20, 2024

Hello !

I can't help without any codesandbox reproduction.. Sorry :/

from mui-color-input.

isibley765 avatar isibley765 commented on August 20, 2024

@viclafouch I can't promise this is functional, since I can't test that it works via my yarn build, but I can share code:

const [inputs, setInputs] = useState({
        . . .
        "inputColor": "#f0f0f688",  /* testing if this works */
        . . .
    });


<FormLabel htmlFor="input-color">Input Color:</FormLabel>
<MuiColorInput
    style={{ "width": "75%", "alignSelf": "center" }}
    aria-label="Input Color" name="Input Color"
    value={inputs['inputColor']}
    onChange={handleChange}
/>

If I comment this out for my project, & then build, this error goes away:

ERROR in ./src/components/InputForm/InputForm.tsx 79:24-50  # <-- line & column are misleading and wrong here, ignore
Module not found: Error: Default condition should be last one  # <-- this might be something that typescript cares about? Maybe?
 @ ./src/components/App/App.tsx 30:18-63
 @ ./src/index.tsx 9:12-45

webpack 5.90.0 compiled with 1 error in 44992 ms
error Command failed with exit code 1.

Just a react + typescript + mui project, using mui-color-input version 2.0.2:

project> npm --version
10.4.0
project> yarn --version
1.22.10
project> node --version
v20.11.0

edit: if the package.json sections help:

    "scripts": {
        "start": "react-scripts start",
        "dev-server": "webpack --watch",
        "lint": "eslint --fix ./src/**",
        "build": "webpack",
        "test": "react-scripts test",
        "eject": "react-scripts eject"
    },
    "dependencies": {
        "@emotion/react": "^11.11.3",
        "@emotion/styled": "^11.11.0",
        "@fontsource/roboto": "^5.0.8",
        "@mui/icons-material": "^5.15.8",
        "@mui/lab": "^5.0.0-alpha.164",
        "@mui/material": "^5.15.7",
        "@testing-library/jest-dom": "^5.17.0",
        "@testing-library/react": "^14.1.2",
        "@testing-library/user-event": "^13.5.0",
        "@typescript-eslint/eslint-plugin": "^6.19.1",
        "css-loader": "^6.9.1",
        "eslint": "^8.56.0",
        "eslint-config-standard-with-typescript": "^43.0.1",
        "eslint-plugin-import": "^2.25.2",
        "eslint-plugin-n": "^15.0.0",
        "eslint-plugin-promise": "^6.0.0",
        "eslint-plugin-react": "^7.33.2",
        "http-server": "^14.1.1",
        "mui-color-input": "^2.0.2",
        "react": "^18.2.0",
        "react-dom": "^18.2.0",
        "react-scripts": "5.0.1",
        "svg-inline-loader": "^0.8.2",
        "ts-loader": "^9.5.1",
        "typescript": "*",
        "web-vitals": "^2.1.4",
        "webpack": "^5.90.0",
        "yarn": "^1.22.21"
    },
    "eslintConfig": {
        "extends": [
            "react-app",
            "react-app/jest"
        ]
    },
    "browserslist": {
        "production": [
            ">0.2%",
            "not dead",
            "not op_mini all"
        ],
        "development": [
            "last 1 chrome version",
            "last 1 firefox version",
            "last 1 safari version"
        ]
    },
    "devDependencies": {
        "@typescript-eslint/parser": "^6.19.1",
        "webpack-cli": "^5.1.4"
    },
    "peerDependencies": {
        "react": "^17.0.0 || ^18.0.0",
        "react-dom": "^17.0.0 || ^18.0.0"
    }

from mui-color-input.

viclafouch avatar viclafouch commented on August 20, 2024

Could you please try with the version 2.0.3 :)

from mui-color-input.

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.