Skip to content

Commit

Permalink
fix: export superset theme props (apache#391)
Browse files Browse the repository at this point in the history
* fix: export superset theme props

* add spec
  • Loading branch information
nytai authored and zhaoyongjie committed Nov 25, 2021
1 parent df64a80 commit 24009a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ const defaultTheme = {
export default styled as CreateStyled<typeof defaultTheme>;

export const supersetTheme = defaultTheme;

export interface SupersetThemeProps {
theme: typeof defaultTheme;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import styled, { supersetTheme } from '../src';
import styled, { supersetTheme, SupersetThemeProps } from '../src';

describe('@superset-ui/style package', () => {
it('exports a theme', () => {
Expand All @@ -8,4 +8,11 @@ describe('@superset-ui/style package', () => {
it('exports styled component templater', () => {
expect(typeof styled.div).toBe('function');
});

it('exports SupersetThemeProps', () => {
const props: SupersetThemeProps = {
theme: supersetTheme,
};
expect(typeof props).toBe('object');
});
});

0 comments on commit 24009a9

Please sign in to comment.