From d0c0f18b455d1748862cb6dca532e483355bcbc7 Mon Sep 17 00:00:00 2001 From: Mike Fix Date: Sun, 18 Jun 2017 14:14:07 -0700 Subject: [PATCH] move constanst to separate file --- components/toolbar.js | 77 +---------------- lib/constants.js | 191 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 194 insertions(+), 74 deletions(-) create mode 100644 lib/constants.js diff --git a/components/toolbar.js b/components/toolbar.js index 5ac6cb0..4fd6e3e 100644 --- a/components/toolbar.js +++ b/components/toolbar.js @@ -3,83 +3,12 @@ import Dropdown from './dropdown' import ColorPicker from './colorpicker' import Settings from './settings' import Button from './button' - -const themes = [ - { - name: 'dracula' - }, - { - name: 'solarized' - } -] - -const langauges = [ - 'Auto Detect', - 'Plain Text', - 'AppleScript', - 'BoxNote', - 'C', - 'C#', - 'CSS', - 'CSV', - 'Closure', - 'CoffeeScript', - 'Cold Fusion', - 'Crystal', - 'Cypher', - 'D', - 'Dart', - 'Diff', - 'Docker', - 'Erlang', - 'F#', - 'Fortran', - 'Gherkin', - 'Go', - 'Groovy', - 'HTML', - 'Haskell', - 'Haxe', - 'Java', - 'JavaScript', - 'JSON', - 'Julia', - 'Kotlin', - 'LaTex', - 'Lisp', - 'Lua', - 'MATLAB', - 'MUMPS', - 'OCaml', - 'Objective-C', - 'PHP', - 'Pascal', - 'Perl', - 'Pig', - 'Post', - 'Puppet', - 'Python', - 'R', - 'Ruby', - 'Rust', - 'SQL', - 'Sass', - 'Scheme', - 'Smalltalk', - 'Swift', - 'TSV', - 'VB.NET', - 'VBScript', - 'Velocity', - 'Verilog', - 'XML', - 'YAML' -].map(name => ({ name })) +import { THEMES, LANGUAGES } from '../lib/constants' const Toolbar = (props) => (
- - + +