adding support to 'line numbers' settings (#116)

* adding support to 'line numbers' settings

* Update Settings.js
main
Neto Guimarães 7 years ago committed by Michael Fix
parent 0303b48928
commit e51628ce8d

@ -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,

@ -51,6 +51,11 @@ class Settings extends React.Component {
enabled={this.props.enabled.widthAdjustment}
onChange={this.props.onChange.bind(null, 'widthAdjustment')}
/>
<Toggle
label="Line Numbers"
enabled={this.props.enabled.lineNumbers}
onChange={this.props.onChange.bind(null, 'lineNumbers')}
/>
<Slider
label="Padding (vertical)"
initialValue={16}

@ -49,6 +49,7 @@ class Editor extends React.Component {
dropShadow: true,
windowControls: true,
widthAdjustment: true,
lineNumbers: false,
paddingVertical: '48px',
paddingHorizontal: '32px',
uploading: false,

Loading…
Cancel
Save