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

Add styles prop to all components #447

Merged
merged 2 commits into from Dec 20, 2018

Conversation

alampros
Copy link
Collaborator

@alampros alampros commented Dec 4, 2017

Merge passed-in styles into reactCSS config for all components to allow for customizing styles.
Add tests.

Would be happy to add to the docs for this, but #446 is in my way.

Merge passed-in styles into reactCSS config for all components to allow for customizing styles.
Add tests.
@flyandi
Copy link

flyandi commented Jan 11, 2018

Could we promote this please - this would give us a lot of flexibility in terms of custom styling.

@Theoton
Copy link

Theoton commented Dec 20, 2018

I think a lot of people need this, like me.

@ziimakc
Copy link

ziimakc commented Dec 20, 2018

When i can use it? :) @alampros

v2.13.8
@casesandberg casesandberg released this on 8 Sep 2017

Hm, i think there will be no new release...

@alampros
Copy link
Collaborator Author

Yikes. This PR is almost a year old. I'll give it a good dusting-off and see if I can get it merged. @casesandberg - any objections?

@ziimakc
Copy link

ziimakc commented Dec 20, 2018

I think this project is dead, so i just edit it in sourse :/

@alampros
Copy link
Collaborator Author

It would pretty awesome to rebuild this with emotion and a <ThemeProvider>...

@alampros
Copy link
Collaborator Author

The tests still pass and the storybook works, so I'm going to merge this.

@alampros alampros merged commit 16d8917 into casesandberg:master Dec 20, 2018
@alampros alampros deleted the pass-style-props branch December 20, 2018 15:42
@alampros
Copy link
Collaborator Author

@casesandberg will have to publish a new version to npm, but for now you can use the repo shorthand in your package.json to get the master.

Cheers! 🍻

@Theoton
Copy link

Theoton commented Dec 21, 2018

@casesandberg will have to publish a new version to npm, but for now you can use the repo shorthand in your package.json to get the master.

Cheers! 🍻

That's good news. Waitting...

@casesandberg
Copy link
Owner

Apologies for the delay. This has been published at react-color@2.17.0

@sachdeva-shrey
Copy link

sachdeva-shrey commented Jun 7, 2020

Hi! I've been trying this but I'm kinda stuck using it in TS. Can you please add an example or document this somewhere? @alampros @casesandberg

Update: I made it work using declaration module, like this

declare module "react-color" {
  interface CompactPickerProps {
    styles?: any;
  }
}

Although, I still can't remove the boxShadow from the CompactPicker component. I tried it like this:
<CompactPicker styles={{ default: { wrap: { boxShadow: "0px !important" } } }} />

I think it relates to the structuring of the component. The boxShadow is not really coming from compact-picker div but it's parent component. Is it possible to fix this somehow? @alampros @casesandberg

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

Successfully merging this pull request may close these issues.

None yet

6 participants