mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-13 21:24:58 +08:00
910f272076
Summary: Fixes T3477 Test Plan: Tests are forthcoming Reviewers: dillon, evan Reviewed By: evan Maniphest Tasks: T3477 Differential Revision: https://phab.nylas.com/D1990
42 lines
1.4 KiB
CoffeeScript
42 lines
1.4 KiB
CoffeeScript
# Publically exposed Nylas UI Components
|
|
class NylasComponentKit
|
|
@load = (prop, path) ->
|
|
Object.defineProperty @prototype, prop,
|
|
get: -> require "../src/components/#{path}"
|
|
|
|
@loadFrom = (prop, path) ->
|
|
Object.defineProperty @prototype, prop,
|
|
get: ->
|
|
exported = require "../src/components/#{path}"
|
|
return exported[prop]
|
|
|
|
@load "Menu", 'menu'
|
|
@load "DropZone", 'drop-zone'
|
|
@load "Spinner", 'spinner'
|
|
@load "Popover", 'popover'
|
|
@load "Flexbox", 'flexbox'
|
|
@load "RetinaImg", 'retina-img'
|
|
@load "ListTabular", 'list-tabular'
|
|
@load "DraggableImg", 'draggable-img'
|
|
@load "EventedIFrame", 'evented-iframe'
|
|
@load "ButtonDropdown", 'button-dropdown'
|
|
@load "MultiselectList", 'multiselect-list'
|
|
@load "InjectedComponent", 'injected-component'
|
|
@load "TokenizingTextField", 'tokenizing-text-field'
|
|
@load "MultiselectActionBar", 'multiselect-action-bar'
|
|
@load "InjectedComponentSet", 'injected-component-set'
|
|
@load "TimeoutTransitionGroup", 'timeout-transition-group'
|
|
|
|
@load "ScrollRegion", 'scroll-region'
|
|
@load "ResizableRegion", 'resizable-region'
|
|
@load "FocusTrackingRegion", 'focus-tracking-region'
|
|
|
|
@loadFrom "MailLabel", "mail-label"
|
|
@loadFrom "LabelColorizer", "mail-label"
|
|
@load "MailImportantIcon", 'mail-important-icon'
|
|
|
|
@loadFrom "FormItem", "generated-form"
|
|
@loadFrom "GeneratedForm", "generated-form"
|
|
@loadFrom "GeneratedFieldset", "generated-form"
|
|
|
|
module.exports = new NylasComponentKit()
|