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

Added Theme support for Placeholder control #1194

Merged

Conversation

fabiofranzini
Copy link
Collaborator

Q A
Bug fix? [ ]
New feature? [X]
New sample? [ ]
Related issues? fixes #1193, mentioned in #1130

What's in this Pull Request?

With this PR I resolved the problem described in #1193.

I made these changes:

  • added to the theme property to the control
  • rewrote the styles part using mergeStyleSets from 'office-ui-fabric-react/lib/Styling'
  • deleted the styles implemented in SASS
  • changed the documentation
  • updated the test Web Part.

In the rendering part I used the ThemeContext.Consumer control to give support to the ThemeProvider control (i.e. pass the theme without setting the theme property)

This is the result:
PlaceholderTheme

@joelfmrodrigues joelfmrodrigues merged commit 44420be into pnp:dev Apr 28, 2022
@joelfmrodrigues
Copy link
Collaborator

@fabiofranzini really nice update, was expecting a lot more changes in the code, but this was very clever to avoid huge changes👏

@joelfmrodrigues
Copy link
Collaborator

Merged! Thanks

@fabiofranzini
Copy link
Collaborator Author

Thanks for the quick response!

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.

2 participants