Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

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

* add spec
  • Loading branch information
nytai authored Apr 29, 2020
1 parent 7d5d63c commit 8ebe0d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/superset-ui-style/src/index.ts
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;
}
9 changes: 8 additions & 1 deletion packages/superset-ui-style/test/index.test.ts
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');
});
});

1 comment on commit 8ebe0d1

@vercel
Copy link

@vercel vercel bot commented on 8ebe0d1 Apr 29, 2020

Choose a reason for hiding this comment

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

Please sign in to comment.