From 3d131ade49a59be865fb6d211752a60de796f335 Mon Sep 17 00:00:00 2001 From: Glen Mailer Date: Thu, 7 Apr 2016 14:17:31 +0100 Subject: [PATCH] Document the style prop docs: style property --- README.md | 3 +++ src/index.js | 3 ++- src/redbox.css | 44 -------------------------------------------- 3 files changed, 5 insertions(+), 45 deletions(-) delete mode 100644 src/redbox.css diff --git a/README.md b/README.md index c80c725..1e24358 100755 --- a/README.md +++ b/README.md @@ -59,6 +59,9 @@ type of sourcemaps. You can choose to not display them with this flag. `useColumns` `[boolean=true]` Column numbers in the stack trace may be unreliable depending on the type of sourcemaps. You can choose to not display them with this flag. +`style` `[?object]` Allows you to override the styles used when rendering the various parts of the +component. It will be shallow-merged with the [default styles](./src/style.js). + If using [react-transform-catch-errors](https://github.com/gaearon/react-transform-catch-errors#installation) you can add these options to your `.babelrc` through the [`imports` property](https://github.com/gaearon/react-transform-catch-errors#installation). ## Sourcemaps with Webpack diff --git a/src/index.js b/src/index.js index 9f3361c..bad70b3 100755 --- a/src/index.js +++ b/src/index.js @@ -10,7 +10,8 @@ export default class RedBox extends Component { filename: PropTypes.string, editorScheme: PropTypes.string, useLines: PropTypes.bool, - useColumns: PropTypes.bool + useColumns: PropTypes.bool, + style: PropTypes.object, } static displayName = 'RedBox' static defaultProps = { diff --git a/src/redbox.css b/src/redbox.css deleted file mode 100644 index cfd46d4..0000000 --- a/src/redbox.css +++ /dev/null @@ -1,44 +0,0 @@ -.redbox { - box-sizing: border-box; - font-family: sans-serif; - font-size: 1em; - position: fixed; - padding: 10px; - top: 0; - bottom: 0; - left: 0; - width: 100%; - background: rgb(204, 0, 0); - color: white; -} - -.redbox .message { - font-weight: bold; -} - -.redbox .stack { - font-family: monospace; - margin-top: 2em; -} - -.redbox .stack .frame { - margin-top: 1em; -} - -.redbox .stack .frame .file { - font-size: 0.8em; - color: #ffffff; - color: rgba(255, 255, 255, 0.7); -} - -.redbox .stack .frame .file { - font-size: 0.8em; - color: #ffffff; - color: rgba(255, 255, 255, 0.7); -} - -.redbox .stack .frame .file a { - text-decoration: none; - color: #ffffff; - color: rgba(255, 255, 255, 0.7); -}