From e51628ce8db99bc9c46897d5d64e0867f47aa517 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Neto=20Guimar=C3=A3es?= Date: Fri, 20 Oct 2017 22:41:56 -0300 Subject: [PATCH] adding support to 'line numbers' settings (#116) * adding support to 'line numbers' settings * Update Settings.js --- components/Carbon.js | 2 +- components/Settings.js | 5 +++++ pages/editor.js | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/components/Carbon.js b/components/Carbon.js index c8dc0da..b9607d5 100644 --- a/components/Carbon.js +++ b/components/Carbon.js @@ -72,7 +72,7 @@ class Carbon extends React.Component { const config = { ...DEFAULT_SETTINGS, ...this.props.config } const options = { - lineNumbers: false, + lineNumbers: config.lineNumbers, mode: this.state.language || 'plaintext', theme: config.theme, scrollBarStyle: null, diff --git a/components/Settings.js b/components/Settings.js index 76396c8..6c611a2 100644 --- a/components/Settings.js +++ b/components/Settings.js @@ -51,6 +51,11 @@ class Settings extends React.Component { enabled={this.props.enabled.widthAdjustment} onChange={this.props.onChange.bind(null, 'widthAdjustment')} /> +