From 699a6c9ad3cb2dd6a80e7d504cc07bed956222c7 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 28 Jul 2015 12:32:27 +0800 Subject: [PATCH] Add enter-animation --- components/enter-animation/demo/basic.md | 51 ++++++++++++++++++++++++ components/enter-animation/index.jsx | 8 ++++ components/enter-animation/index.md | 18 +++++++++ index.js | 1 + package.json | 1 + 5 files changed, 79 insertions(+) create mode 100644 components/enter-animation/demo/basic.md create mode 100644 components/enter-animation/index.jsx create mode 100644 components/enter-animation/index.md diff --git a/components/enter-animation/demo/basic.md b/components/enter-animation/demo/basic.md new file mode 100644 index 0000000000..13e58055b8 --- /dev/null +++ b/components/enter-animation/demo/basic.md @@ -0,0 +1,51 @@ +# 基本 + +- order: 0 + +第一个对话框。 + +--- + +````jsx +var EnterAnimation = antd.EnterAnimation; + +var Test = React.createClass({ + getInitialState(){ + return{ + visible: false + } + }, + showModal() { + this.setState({ + visible: true + }); + }, + handleOk() { + console.log('点击了确定'); + this.setState({ + visible: false + }); + }, + handleCancel() { + console.log('点击了取消'); + this.setState({ + visible: false + }); + }, + render() { + return
+ + +

对话框的内容

+

对话框的内容

+

对话框的内容

+
+
; + } +}); + +React.render( , document.getElementById('components-modal-demo-basic')); +```` diff --git a/components/enter-animation/index.jsx b/components/enter-animation/index.jsx new file mode 100644 index 0000000000..097dfb74c1 --- /dev/null +++ b/components/enter-animation/index.jsx @@ -0,0 +1,8 @@ +import React from 'react'; +import EnterAnimation from 'enter-animation'; + +export default class AntEnterAnimation extends React.Component { + render() { + return ; + } +} diff --git a/components/enter-animation/index.md b/components/enter-animation/index.md new file mode 100644 index 0000000000..4e2efbef0e --- /dev/null +++ b/components/enter-animation/index.md @@ -0,0 +1,18 @@ +# Modal + +- order: 11 +- category: Components +- chinese: 进场动画 + +--- + +页面进场离场的动画。 + +## 何时使用 + +当页面分为几个明显的区块时,用一组进场动画渐进载入各个区块,使页面转场更加流畅和舒适, +提高整体视觉效果和产品的质感。 + +## API + + diff --git a/index.js b/index.js index 78dad62408..6a62263035 100644 --- a/index.js +++ b/index.js @@ -22,6 +22,7 @@ var antd = { Collapse: require('./components/collapse'), message: require('./components/message'), Slider: require('./components/slider'), + EnterAnimation: require('./components/enter-animation'), Radio: require('./components/radio'), RadioGroup: require('./components/radio/group') }; diff --git a/package.json b/package.json index 0fc1cb4469..5a24f01080 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ ], "license": "MIT", "dependencies": { + "enter-animation": "^0.1.0", "gregorian-calendar": "~3.0.0", "gregorian-calendar-format": "~3.0.1", "object-assign": "~3.0.0",