diff --git a/.storybook/config.js b/.storybook/config.js index 2ff44a89..000037fd 100644 --- a/.storybook/config.js +++ b/.storybook/config.js @@ -1,11 +1,12 @@ import React from "react" import { configure, addDecorator } from "@storybook/react" import { withKnobs } from "@storybook/addon-knobs" -import { ThemeProvider } from "styled-components" + +import ReactotronProvider from "../src/ReactotronProvider" import theme from "../src/theme" -const StyledDecorator = storyFn => {storyFn()} +const StyledDecorator = storyFn => {storyFn()} addDecorator(StyledDecorator) addDecorator(withKnobs) diff --git a/src/ReactotronProvider/index.tsx b/src/ReactotronProvider/index.tsx new file mode 100644 index 00000000..34ebe504 --- /dev/null +++ b/src/ReactotronProvider/index.tsx @@ -0,0 +1,20 @@ +import React, { FunctionComponent } from "react" +import styled, { ThemeProvider } from "styled-components" + +import theme from "../theme" + +const ReactotronContainer = styled.div` + font-family: ${props => props.theme.fontFamily}; + width: 100%; + height: 100%; +` + +const ReactotronProvider: FunctionComponent = ({ children }) => { + return ( + + {children} + + ) +} + +export default ReactotronProvider; diff --git a/src/index.ts b/src/index.ts index a9a05e2d..1dd09f6d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,6 +6,7 @@ import ContentView from "./ContentView" import DispatchActionModal from "./DispatchActionModal" import Header from "./Header" import Modal from "./Modal" +import ReactotronProvider from "./ReactotronProvider" import SubscriptionAddModal from "./SubscriptionAddModal" import ActionButton from "./ActionButton" import TimelineCommand from "./TimelineCommand" @@ -28,6 +29,7 @@ export { DispatchActionModal, Header, Modal, + ReactotronProvider, SubscriptionAddModal, ActionButton, TimelineCommand, diff --git a/src/theme.ts b/src/theme.ts index af72e9ea..d52e12ae 100644 --- a/src/theme.ts +++ b/src/theme.ts @@ -1,4 +1,5 @@ export default { + fontFamily: '"Fira Code", "SF Mono", "Consolas", "Segoe UI", "Roboto", "-apple-system", "Helvetica Neue", sans-serif', background: "#1e1e1e", backgroundDarker: "hsl(0, 0%, 10.6%)", backgroundHighlight: "#464b50",