From 32e1c4eefb30f57e68e9fcb988f52197bd8ff83a Mon Sep 17 00:00:00 2001 From: Javi Velasco Date: Sat, 19 Sep 2015 14:13:01 +0200 Subject: [PATCH] Rename aside to drawer --- .../{aside/aside.md => drawer/drawer.md} | 0 components/{aside => drawer}/index.jsx | 2 +- components/{aside => drawer}/style.styl | 3 ++ spec/components/aside.cjsx | 37 ------------------- spec/components/drawer.cjsx | 35 ++++++++++++++++++ spec/index.cjsx | 4 +- 6 files changed, 41 insertions(+), 40 deletions(-) rename components/{aside/aside.md => drawer/drawer.md} (100%) rename components/{aside => drawer}/index.jsx (97%) rename components/{aside => drawer}/style.styl (95%) delete mode 100644 spec/components/aside.cjsx create mode 100644 spec/components/drawer.cjsx diff --git a/components/aside/aside.md b/components/drawer/drawer.md similarity index 100% rename from components/aside/aside.md rename to components/drawer/drawer.md diff --git a/components/aside/index.jsx b/components/drawer/index.jsx similarity index 97% rename from components/aside/index.jsx rename to components/drawer/index.jsx index d0176341..d0b91f33 100644 --- a/components/aside/index.jsx +++ b/components/drawer/index.jsx @@ -6,7 +6,7 @@ import css from './style'; export default React.createClass({ mixins: [addons.PureRenderMixin], - displayName: 'Aside', + displayName: 'Drawer', propTypes: { active: React.PropTypes.bool, diff --git a/components/aside/style.styl b/components/drawer/style.styl similarity index 95% rename from components/aside/style.styl rename to components/drawer/style.styl index 9ec7806b..b3daa5ec 100644 --- a/components/aside/style.styl +++ b/components/drawer/style.styl @@ -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 @@ -52,6 +53,8 @@ WIDTH = (4 * UNIT) &.active pointer-events : all > :local(.container) + transition-delay : ANIMATION_DELAY transform : translateX(0) + > :local(.overlay) opacity : .5 diff --git a/spec/components/aside.cjsx b/spec/components/aside.cjsx deleted file mode 100644 index 602bfef6..00000000 --- a/spec/components/aside.cjsx +++ /dev/null @@ -1,37 +0,0 @@ -### -@todo -### - -Aside = require '../../components/aside' -Button = require '../../components/button' - -module.exports = React.createClass - - # -- States & Properties - - # -- Events - onClick: (ref, method) -> - @refs[ref][method]() - - # -- Render - render: -> -
- -

Aside

- - - - - -
diff --git a/spec/components/drawer.cjsx b/spec/components/drawer.cjsx new file mode 100644 index 00000000..e7752f9c --- /dev/null +++ b/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: -> +
+ +

Drawer

+ +

Officia deserunt mollit.

+

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.

+

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.

+
+ + +
diff --git a/spec/index.cjsx b/spec/index.cjsx index 1141bc76..ae2cae6c 100644 --- a/spec/index.cjsx +++ b/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' @@ -25,7 +25,7 @@ Test = React.createClass render: ->

React-Toolbox New way for create

-