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

Commit

Permalink
feat: Apply monospace fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
leonskim authored and rmevans9 committed Dec 15, 2019
1 parent a0d2cbe commit 1780807
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -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 => <ThemeProvider theme={theme}>{storyFn()}</ThemeProvider>
const StyledDecorator = storyFn => <ReactotronProvider>{storyFn()}</ReactotronProvider>
addDecorator(StyledDecorator)

addDecorator(withKnobs)
Expand Down
20 changes: 20 additions & 0 deletions src/ReactotronProvider/index.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<ThemeProvider theme={theme}>
<ReactotronContainer>{children}</ReactotronContainer>
</ThemeProvider>
)
}

export default ReactotronProvider;
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -28,6 +29,7 @@ export {
DispatchActionModal,
Header,
Modal,
ReactotronProvider,
SubscriptionAddModal,
ActionButton,
TimelineCommand,
Expand Down
1 change: 1 addition & 0 deletions src/theme.ts
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 1780807

Please sign in to comment.