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

#387 add theme prop support to viewer component #390

Merged
merged 5 commits into from
Jan 21, 2022

Conversation

AnaMoskvina
Copy link

@AnaMoskvina AnaMoskvina commented Jan 20, 2022

Added theme prop which accepts an object of deep partial of MiewTheme interface
Only some theme fields can be provided in 'theme' props. If some theme fields are missing, default theme settings will be applied instead

@AnaMoskvina AnaMoskvina linked an issue Jan 20, 2022 that may be closed by this pull request
options?: MiewOptions
theme?: UserTheme
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use MiewTheme

import { merge } from 'lodash'
import { store } from 'state'
import { defaultTheme, UserTheme } from './theming'
import { transformThemeKeys } from './utils/transformThemeKeys'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this function into Viewer.tsx

@AnaMoskvina AnaMoskvina marked this pull request as draft January 20, 2022 16:20
@AnaMoskvina AnaMoskvina marked this pull request as ready for review January 20, 2022 16:32
@AndreiMazol AndreiMazol merged commit 5ffad67 into master Jan 21, 2022
@AndreiMazol AndreiMazol deleted the #387-add-theme-prop-support-to-viewer-component branch January 21, 2022 09:43
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.

Add theme prop support to viewer component
2 participants