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

Adding a default value inside the custom property statements #38

Merged
merged 6 commits into from
Nov 16, 2020

Conversation

kendallgassner
Copy link
Contributor

What Changed

Why

Todo:

__tests__/modern.test.ts Outdated Show resolved Hide resolved
__tests__/modern.test.ts Show resolved Hide resolved
Copy link
Contributor

@hipstersmoothie hipstersmoothie left a comment

Choose a reason for hiding this comment

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

I think we can improve this for when the variable is used multiple times. I think it would also be cool to add a config option that disables the inlining. Some people may want to expose those variables for consumers of the components. the default can be to inline. The option could be called inlineRootThemeVariables with the default being true


.mint {
--color: teal
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome!

Comment on lines 101 to 104
const inlineRootThemeVariables =
typeof options.inlineRootThemeVariables === 'undefined'
? true
: options.inlineRootThemeVariables;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const inlineRootThemeVariables =
typeof options.inlineRootThemeVariables === 'undefined'
? true
: options.inlineRootThemeVariables;
const inlineRootThemeVariables = options.inlineRootThemeVariables ?? options.inlineRootThemeVariables;

Copy link
Contributor

@hipstersmoothie hipstersmoothie left a comment

Choose a reason for hiding this comment

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

Just 1 thing then you can merge this!

@kendallgassner kendallgassner merged commit a1c95d5 into intuit:master Nov 16, 2020
@hipstersmoothie
Copy link
Contributor

🚀 PR was released in v2.2.2 🚀

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

Successfully merging this pull request may close these issues.

2 participants