-
Notifications
You must be signed in to change notification settings - Fork 272
fix: export superset theme props #391
fix: export superset theme props #391
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/superset/superset-ui/bph7gpl8y |
Codecov Report
@@ Coverage Diff @@
## master #391 +/- ##
==========================================
- Coverage 26.30% 22.25% -4.06%
==========================================
Files 192 261 +69
Lines 5291 6474 +1183
Branches 474 587 +113
==========================================
+ Hits 1392 1441 +49
- Misses 3864 4996 +1132
- Partials 35 37 +2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add unit test to ensure 100% coverage
@@ -42,3 +42,7 @@ const defaultTheme = { | |||
export default styled as CreateStyled<typeof defaultTheme>; | |||
|
|||
export const supersetTheme = defaultTheme; | |||
|
|||
export interface SupersetThemeProps { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this problem still persists with exporting types. We can try this first if you'd like, but if you run into issue later in the consuming app about "reexporting type", please come back here and move the definition of the interface to a new file such as types.ts
types.ts
export interface SupersetThemeProps {
theme: typeof defaultTheme;
}
then export all from the type file like this in the index.ts
export default styled as CreateStyled<typeof defaultTheme>;
export const supersetTheme = defaultTheme;
export * from './types'
🏆 Enhancements
Export SupersetThemeProps interface so that it can be extended when using additional props in styled components.