Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

theme is not exported from react-trip-date #13

Closed
ionescho opened this issue Apr 1, 2021 · 5 comments
Closed

theme is not exported from react-trip-date #13

ionescho opened this issue Apr 1, 2021 · 5 comments

Comments

@ionescho
Copy link

ionescho commented Apr 1, 2021

image

@samsam-ahmadi
Copy link
Owner

@ionescho Hi, which version are you using?

@ionescho
Copy link
Author

ionescho commented Apr 1, 2021

@samsam-ahmadi the latest one, just installed it with npm install --save react-trip-date and it came as 1.5.1.

@samsam-ahmadi
Copy link
Owner

@ionescho If you are following the old documentation is wrong, In the new version don't need to get the theme from the package and put it to ThemeProvider we handle it in the inner of the component.
But yes I should export the type of theme.

In this version, you need to create an object and fill it with this structure:

  const theme = {
    primary: {
      light: "#757ce8",
      main: "#3f50b5",
      dark: "#002884",
    },
    grey: {
      700: "#707070",
      900: "#1b1b1d",
    },
    background: {
      default: "#f5f5f5",
    },
    text: {
      disabled: "#BABABA",
    },
  };

  <DatePicker theme={theme} onChange={dates => console.log("dates", dates)} />

@ionescho
Copy link
Author

ionescho commented Apr 1, 2021

Alright, clear.
This page needs to be updated: https://reactjsexample.com/a-date-range-picker-for-reactjs/

Thanks

@samsam-ahmadi
Copy link
Owner

@ionescho NP. I couldn't find a way to tell them update their page. :((

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants