Skip to content

Commit

Permalink
Rename aside to drawer
Browse files Browse the repository at this point in the history
  • Loading branch information
javivelasco committed Sep 19, 2015
1 parent c4779ca commit 32e1c4e
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 40 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion components/aside/index.jsx → components/drawer/index.jsx
Expand Up @@ -6,7 +6,7 @@ import css from './style';
export default React.createClass({
mixins: [addons.PureRenderMixin],

displayName: 'Aside',
displayName: 'Drawer',

propTypes: {
active: React.PropTypes.bool,
Expand Down
3 changes: 3 additions & 0 deletions components/aside/style.styl → components/drawer/style.styl
Expand Up @@ -30,6 +30,7 @@ WIDTH = (4 * UNIT)
position : absolute
top : 0
transform-style : preserve-3d
transition-delay : 0s
transition-duration : .5 * ANIMATION_DURATION
transition-property : transform
transition-timing-function : ANIMATION_EASE
Expand All @@ -52,6 +53,8 @@ WIDTH = (4 * UNIT)
&.active
pointer-events : all
> :local(.container)
transition-delay : ANIMATION_DELAY
transform : translateX(0)

> :local(.overlay)
opacity : .5
37 changes: 0 additions & 37 deletions spec/components/aside.cjsx

This file was deleted.

35 changes: 35 additions & 0 deletions spec/components/drawer.cjsx
@@ -0,0 +1,35 @@
###
@todo
###

Drawer = require '../../components/drawer'
Button = require '../../components/button'

module.exports = React.createClass

# -- States & Properties

# -- Events
onClick: (ref, method) ->
@refs[ref][method]()

# -- Render
render: ->
<section>

<h2>Drawer</h2>
<Drawer ref="left" hideable=true>
<h2>Officia deserunt mollit.</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</Drawer>

<Drawer ref="right" type="right">
<Button label="Close" onClick={@onClick.bind null, "right", "hide"} />
</Drawer>

<nav>
<Button className="accent" label="Show drawer left" type="raised" onClick={@onClick.bind null, "left", "show"} />
<Button className="primary" label="Show drawer left" type="raised" label="Show drawer right" onClick={@onClick.bind null, "right", "show"} />
</nav>
</section>
4 changes: 2 additions & 2 deletions spec/index.cjsx
@@ -1,7 +1,7 @@
"use strict"

# -- Components
Aside = require './components/aside'
Drawer = require './components/drawer'
Autocomplete = require './components/autocomplete'
Button = require './components/button'
Card = require './components/card'
Expand All @@ -25,7 +25,7 @@ Test = React.createClass
render: ->
<app data-toolbox={true}>
<h1>React-Toolbox <small>New way for create</small></h1>
<Aside />
<Drawer />
<Autocomplete />
<Button />
<Card />
Expand Down

0 comments on commit 32e1c4e

Please sign in to comment.