diff --git a/client/constants.js b/client/constants.js index 6f5833fd..ed64f2b0 100644 --- a/client/constants.js +++ b/client/constants.js @@ -34,5 +34,8 @@ export const SHOW_MODAL = 'SHOW_MODAL'; export const HIDE_MODAL = 'HIDE_MODAL'; export const CREATE_FILE = 'CREATE_FILE'; +export const EXPAND_SIDEBAR = 'EXPAND_SIDEBAR'; +export const COLLAPSE_SIDEBAR = 'COLLAPSE_SIDEBAR'; + // eventually, handle errors more specifically and better export const ERROR = 'ERROR'; diff --git a/client/images/left-arrow.svg b/client/images/left-arrow.svg new file mode 100644 index 00000000..22f17dcb --- /dev/null +++ b/client/images/left-arrow.svg @@ -0,0 +1,12 @@ + + + + arrow shape copy + Created with Sketch. + + + + + + + \ No newline at end of file diff --git a/client/images/plus-icon.svg b/client/images/plus-icon.svg new file mode 100644 index 00000000..0b9347f2 --- /dev/null +++ b/client/images/plus-icon.svg @@ -0,0 +1,16 @@ + + + + close shape + Created with Sketch. + + + + + + + + + + + \ No newline at end of file diff --git a/client/images/right-arrow.svg b/client/images/right-arrow.svg new file mode 100644 index 00000000..6d62c369 --- /dev/null +++ b/client/images/right-arrow.svg @@ -0,0 +1,12 @@ + + + + arrow shape copy + Created with Sketch. + + + + + + + \ No newline at end of file diff --git a/client/modules/IDE/actions/ide.js b/client/modules/IDE/actions/ide.js index 70363669..a0b48434 100644 --- a/client/modules/IDE/actions/ide.js +++ b/client/modules/IDE/actions/ide.js @@ -36,3 +36,15 @@ export function closeNewFileModal() { type: ActionTypes.HIDE_MODAL }; } + +export function expandSidebar() { + return { + type: ActionTypes.EXPAND_SIDEBAR + }; +} + +export function collapseSidebar() { + return { + type: ActionTypes.COLLAPSE_SIDEBAR + }; +} diff --git a/client/modules/IDE/components/Sidebar.js b/client/modules/IDE/components/Sidebar.js index ffeea432..f1ccf179 100644 --- a/client/modules/IDE/components/Sidebar.js +++ b/client/modules/IDE/components/Sidebar.js @@ -1,17 +1,39 @@ import React, { PropTypes } from 'react'; import classNames from 'classnames'; +import InlineSVG from 'react-inlinesvg'; +const rightArrowUrl = require('../../../images/right-arrow.svg'); +const leftArrowUrl = require('../../../images/left-arrow.svg'); function Sidebar(props) { + const sidebarClass = classNames({ + sidebar: true, + 'sidebar--contracted': !props.isExpanded + }); + return ( -
+

Sketch Files

- - + - +
+ + + + + + + + + + +