mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Add super basic styling to config view and 2 non-functional panels
This commit is contained in:
committed by
Corey Johnson & Kevin Sawicki
parent
6c43fd5c9d
commit
252159afcf
@@ -1,6 +1,7 @@
|
||||
{View, $$} = require 'space-pen'
|
||||
$ = require 'jquery'
|
||||
_ = require 'underscore'
|
||||
EditorConfigPanel = require 'editor-config-panel'
|
||||
|
||||
module.exports =
|
||||
class ConfigView extends View
|
||||
@@ -15,6 +16,9 @@ class ConfigView extends View
|
||||
@on 'click', '#panel-menu li', (e) =>
|
||||
@showPanel($(e.target).attr('name'))
|
||||
|
||||
@addPanel('General', $$ -> @div "General")
|
||||
@addPanel('Editor', new EditorConfigPanel)
|
||||
|
||||
addPanel: (name, panel) ->
|
||||
panelItem = $$ -> @li name: name, name
|
||||
@panelMenu.append(panelItem)
|
||||
|
||||
13
src/app/editor-config-panel.coffee
Normal file
13
src/app/editor-config-panel.coffee
Normal file
@@ -0,0 +1,13 @@
|
||||
{View} = require 'space-pen'
|
||||
|
||||
module.exports =
|
||||
class EditorConfigPanel extends View
|
||||
@content: ->
|
||||
@div class: 'config-panel', =>
|
||||
@div class: 'row', =>
|
||||
@label for: 'editor.fontSize', "Font Size:"
|
||||
@input name: 'editor.fontSize', size: 2
|
||||
|
||||
@div class: 'row', =>
|
||||
@label for: 'editor.fontFamily', "Font Family:"
|
||||
@input name: 'editor.fontFamily'
|
||||
Reference in New Issue
Block a user