diff --git a/packages/grafana-ui/src/components/TableInputCSV/TableInputCSV.story.internal.tsx b/packages/grafana-ui/src/components/TableInputCSV/TableInputCSV.story.internal.tsx index a702a4688a0..b3ad26c955a 100644 --- a/packages/grafana-ui/src/components/TableInputCSV/TableInputCSV.story.internal.tsx +++ b/packages/grafana-ui/src/components/TableInputCSV/TableInputCSV.story.internal.tsx @@ -1,6 +1,7 @@ import React from 'react'; -import TableInputCSV from './TableInputCSV'; +import { TableInputCSV } from './TableInputCSV'; +import { Meta } from '@storybook/react'; import { action } from '@storybook/addon-actions'; import { DataFrame } from '@grafana/data'; import { withCenteredStory } from '../../utils/storybook/withCenteredStory'; @@ -9,7 +10,7 @@ export default { title: 'Forms/TableInputCSV', component: TableInputCSV, decorators: [withCenteredStory], -}; +} as Meta; export const basic = () => { return ( diff --git a/packages/grafana-ui/src/components/TableInputCSV/TableInputCSV.test.tsx b/packages/grafana-ui/src/components/TableInputCSV/TableInputCSV.test.tsx index 4e08b103027..e2953fc1c43 100644 --- a/packages/grafana-ui/src/components/TableInputCSV/TableInputCSV.test.tsx +++ b/packages/grafana-ui/src/components/TableInputCSV/TableInputCSV.test.tsx @@ -1,7 +1,7 @@ import React from 'react'; import renderer from 'react-test-renderer'; -import TableInputCSV from './TableInputCSV'; +import { TableInputCSV } from './TableInputCSV'; import { DataFrame } from '@grafana/data'; describe('TableInputCSV', () => { diff --git a/packages/grafana-ui/src/components/TableInputCSV/TableInputCSV.tsx b/packages/grafana-ui/src/components/TableInputCSV/TableInputCSV.tsx index 5b92ef0d6cf..e0633e398ca 100644 --- a/packages/grafana-ui/src/components/TableInputCSV/TableInputCSV.tsx +++ b/packages/grafana-ui/src/components/TableInputCSV/TableInputCSV.tsx @@ -1,9 +1,14 @@ import React from 'react'; import debounce from 'lodash/debounce'; +import { css } from 'emotion'; import { DataFrame, CSVConfig, readCSV } from '@grafana/data'; import { Icon } from '../Icon/Icon'; +import { GrafanaTheme } from '@grafana/data'; +import { Themeable } from '../../types/theme'; +import { TextArea } from '../TextArea/TextArea'; +import { stylesFactory, withTheme } from '../../themes'; -interface Props { +interface Props extends Themeable { config?: CSVConfig; text: string; width: string | number; @@ -19,7 +24,7 @@ interface State { /** * Expects the container div to have size set and will fill it 100% */ -export class TableInputCSV extends React.PureComponent { +export class UnThemedTableInputCSV extends React.PureComponent { constructor(props: Props) { super(props); @@ -59,19 +64,20 @@ export class TableInputCSV extends React.PureComponent { }; render() { - const { width, height } = this.props; + const { width, height, theme } = this.props; const { data } = this.state; + const styles = getStyles(theme); return ( -
-