GithubHelp home page GithubHelp logo

Comments (4)

LeandroTorresSicilia avatar LeandroTorresSicilia commented on June 14, 2024

Hi @Yusseiin

You need to pass theme in this way:

  const theme = {
    rainbow: {
        palette: {
          brand: "#ff0000",
          success: "",
          mainBackground: "",
          ..
        },
    },
};

Here there is doc about how to use it:
https://react-rainbow.io/#/Customization

from react-rainbow.

Yusseiin avatar Yusseiin commented on June 14, 2024

Hi @Yusseiin

You need to pass theme in this way:

  const theme = {
    rainbow: {
        palette: {
          brand: "#ff0000",
          success: "",
          mainBackground: "",
          ..
        },
    },
};

Here there is doc about how to use it: https://react-rainbow.io/#/Customization

There is that part in my code:

const theme = {
    rainbow: {
        palette: {
          main: "#ff0000",
          dark: "#ff0000",
          light: "#ff0000",
        },
        background: {
          main: "#000000",
          highlight: "#000000",
          secondary: "#000000",
          disabled: "#000000",
        }
    },
};

And then i recall it here:

<RainbowThemeContainer theme={theme}>
                <Picklist
                    value={selection}
                    placeholder={selection}
                    onChange={handlePicklistChange}
                    style={containerStyles}
                    //variant="inverse"
                     >
                    <Option name="Custom" label="Custom"  />
                    <Option name="Today" label="Today" value = {Today} />
                    <Option name="Yesterday" label="Yesterday" value = {Yesterday}/>
                    <Option name="This Week" label="This Week" value = {Week}/>
                </Picklist>
                
            <DatePickerModal
                title='Select a Date'
                isOpen={isOpen}
                variant="double"
                value={dates}
                selectionType="range"
                onChange={handleDatePickerChange}
                onRequestClose={() => {setOpen(false); handleDatePickerChange(dates)}}
            />
            </RainbowThemeContainer>

but is not changing the color

from react-rainbow.

Yusseiin avatar Yusseiin commented on June 14, 2024

@LeandroTorresSicilia i think i have found the problem.
in the wiki "https://react-rainbow.io/#/Customization" it says to use background: {, but the correct one is mainBackground:.
For changing the text color what is the correct one? is says text but is not working. I have tryed with

        titleText: theme.palette.secondary[200],
        mainText: theme.palette.secondary[200],
        titleText: theme.palette.secondary[200],
        headerText: theme.palette.secondary[200],
        labelText: theme.palette.secondary[200],
        disabledText: theme.palette.secondary[200],

but no one is working

from react-rainbow.

LeandroTorresSicilia avatar LeandroTorresSicilia commented on June 14, 2024

@Yusseiin Right now we don't support changing the text color, you can only change these ones:

Screenshot 2023-06-15 at 10 02 20 AM

Using the code as I said above.
Here is a code sandbox: https://codesandbox.io/s/quirky-dew-rzxj7t?file=/src/App.js

from react-rainbow.

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.