Skip to content

Commit

Permalink
add button 20%
Browse files Browse the repository at this point in the history
  • Loading branch information
光弘 committed Mar 30, 2017
1 parent 5ca42e4 commit 8f7a3a3
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 55 deletions.
1 change: 0 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

* feat: support animation


## v0.3.1 / 2016-12-05

* feat: #3
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Yes please! See the [CONTRIBUTING](https://github.com/uxcore/uxcore/blob/master/
| enableThumbs | boolean | no | false | whether the show thumbnail list|
| thumbPlacement | string | no | right | the placement of thumbnail, you can set 'top'/'right'/'bottom'/'left'/ |
| thumbBackground | string | no | #000 | if the image couldn't cover the gird, give it a background|
| showButton | boolean | no | true | show the function button |

### Photo.Props

Expand Down
107 changes: 54 additions & 53 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,54 +1,55 @@
{
"name": "uxcore-album",
"version": "0.3.8",
"description": "uxcore-album component for uxcore.",
"repository": "https://github.com/uxcore/uxcore-album.git",
"author": "vincent.bian",
"main": "build/index.js",
"scripts": {
"start": "uxcore-tools run start",
"server": "uxcore-tools run server",
"lint": "uxcore-tools run lint",
"build": "uxcore-tools run build",
"test": "uxcore-tools run test",
"coverage": "uxcore-tools run coverage",
"pub": "uxcore-tools run pub",
"dep": "uxcore-tools run dep",
"tnpm-dep": "uxcore-tools run tnpm-dep",
"saucelabs": "uxcore-tools run saucelabs",
"chrome": "uxcore-tools run chrome",
"browsers": "uxcore-tools run browsers"
},
"bugs": {
"url": "http://github.com/uxcore/uxcore-album/issues"
},
"keywords": [
"react",
"react-component",
"uxcore-album",
"Album",
"uxcore",
"album",
"preview",
"image"
],
"devDependencies": {
"console-polyfill": "^0.2.2",
"enzyme": "^2.6.0",
"es5-shim": "^4.5.8",
"expect.js": "~0.3.1",
"kuma-base": "1.x",
"react": "0.14.x",
"react-addons-test-utils": "0.14.x",
"react-dom": "0.14.x",
"uxcore-kuma": "2.x",
"uxcore-tools": "0.2.x"
},
"dependencies": {
"classnames": "^2.2.5",
"object-assign": "^4.0.0",
"uxcore-animate": "~0.2.0"
},
"contributors": [],
"license": "MIT"
}
"name": "uxcore-album",
"version": "0.3.8",
"description": "uxcore-album component for uxcore.",
"repository": "https://github.com/uxcore/uxcore-album.git",
"author": "vincent.bian",
"main": "build/index.js",
"scripts": {
"start": "uxcore-tools run start",
"server": "uxcore-tools run server",
"lint": "uxcore-tools run lint",
"build": "uxcore-tools run build",
"test": "uxcore-tools run test",
"coverage": "uxcore-tools run coverage",
"pub": "uxcore-tools run pub",
"dep": "uxcore-tools run dep",
"tnpm-dep": "uxcore-tools run tnpm-dep",
"saucelabs": "uxcore-tools run saucelabs",
"chrome": "uxcore-tools run chrome",
"browsers": "uxcore-tools run browsers"
},
"bugs": {
"url": "http://github.com/uxcore/uxcore-album/issues"
},
"keywords": [
"react",
"react-component",
"uxcore-album",
"Album",
"uxcore",
"album",
"preview",
"image"
],
"devDependencies": {
"console-polyfill": "^0.2.2",
"enzyme": "^2.6.0",
"es5-shim": "^4.5.8",
"expect.js": "~0.3.1",
"kuma-base": "1.x",
"react": "0.14.x",
"react-addons-test-utils": "0.14.x",
"react-dom": "0.14.x",
"uxcore-kuma": "2.x",
"uxcore-tools": "0.2.x"
},
"dependencies": {
"classnames": "^2.2.5",
"object-assign": "^4.0.0",
"uxcore-animate": "~0.2.0",
"uxcore-icon": "^0.1.10"
},
"contributors": [],
"license": "MIT"
}
5 changes: 4 additions & 1 deletion src/Album.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class Album extends React.Component {

renderAlbum() {
const { current, open } = this.state;
const { enableKeyBoardControl } = this.props;
const { enableKeyBoardControl, showButton } = this.props;
let { children } = this.props;
if (!Array.isArray(children)) {
children = [children];
Expand Down Expand Up @@ -109,6 +109,7 @@ class Album extends React.Component {
enableKeyBoardControl={enableKeyBoardControl}
ref={node => (this.viewer = node)}
coordinate={coordinate}
showButton={showButton}
current={current}
open={open}
onSetCurrent={(c) => {
Expand Down Expand Up @@ -235,6 +236,7 @@ Album.defaultProps = {
thumbBackground: '#000',
enableThumbs: false,
enableKeyBoardControl: true,
showButton: true,
};


Expand All @@ -246,6 +248,7 @@ Album.propTypes = {
thumbBackground: React.PropTypes.string,
enableThumbs: React.PropTypes.bool,
enableKeyBoardControl: React.PropTypes.bool,
showButton: React.PropTypes.bool,
children: React.PropTypes.node,
};

Expand Down

0 comments on commit 8f7a3a3

Please sign in to comment.