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

fix custom stylesheet for commonjs #2428

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

suneox
Copy link

@suneox suneox commented Mar 11, 2024

For common js can not get custom style with the current syntax

@@ -37,6 +38,6 @@ export default function styleConstructor(theme: Theme = {}) {
indicator: {
marginTop: 80
},
...(theme['stylesheet.agenda.list'] || {})
...get(theme, 'stylesheet.agenda.list', {})
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why 'get' and not optional chaining?

Copy link
Author

Choose a reason for hiding this comment

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

The theme is a literal object, so we cannot use optional chaining syntax to access its properties.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The theme is a typed object, you can do ...theme?.stylesheet?.agenda?.main

Copy link
Author

Choose a reason for hiding this comment

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

I have updated

Copy link
Author

Choose a reason for hiding this comment

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

@Inbal-Tish i've updated have you got any feedback on the latest change

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