diff --git a/assets/index.less b/assets/index.less index 7946275..1fac4b4 100644 --- a/assets/index.less +++ b/assets/index.less @@ -3,11 +3,11 @@ .@{prefixCls} { &-content { height: 0; - opacity: 0; transition-duration: .3s; - transition-timing-function: ease-in; + // transition-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19); + transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); overflow: hidden; - > p, > div { + & > &-box { margin-top: 16px; margin-bottom: 16px; } diff --git a/assets/index/ant.less b/assets/index/ant.less index f7ea494..c2c4ef3 100644 --- a/assets/index/ant.less +++ b/assets/index/ant.less @@ -1,5 +1,5 @@ @prefixCls: rc-collapse; -@borderStyle: 1px solid #d9d9d9; +@borderStyle: 1px solid #e9e9e9; #arrow { .common(){ @@ -22,40 +22,54 @@ } .@{prefixCls} { - background-color: #f3f5f7; + background-color: #fbfbfb; border-radius: 3px; border-top: @borderStyle; border-left: @borderStyle; border-right: @borderStyle; - &-header { - height: 38px; - line-height: 38px; - text-indent: 16px; - color: #666; - border-bottom: @borderStyle; - &:before { - display: inline-block; - content: '\20'; - #arrow > .common(); - #arrow > .right(3px, 4px, #666); - vertical-align: middle; - margin-right: 8px; + & > &-item { + > .@{prefixCls}-header { + height: 38px; + line-height: 38px; + text-indent: 16px; + color: #666; + border-bottom: @borderStyle; + &:before { + display: inline-block; + content: '\20'; + #arrow > .common(); + #arrow > .right(3px, 4px, #666); + vertical-align: middle; + margin-right: 8px; + } } } &-content { color: #999; padding: 0 16px; - background-color: #fbfbfb; + background-color: #f4f4f4; + } + + &-item:last-child { + > .@{prefixCls}-content { + border-radius: 0 0 3px 3px; + } } &-content-active { border-bottom: @borderStyle; } - &-item-active { - .@{prefixCls}-header::before { - #arrow > .bottom(3px, 4px, #666); + + & > &-item-active { + > .@{prefixCls}-header { + border-bottom: none; + + &:before { + #arrow > .bottom(3px, 4px, #666); + margin-right: 6px; + } } } } diff --git a/package.json b/package.json index 7d36d7c..562bff3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rc-collapse", - "version": "1.2.1", + "version": "1.2.2", "description": "rc-collapse ui component for react", "keywords": [ "react", diff --git a/src/Panel.jsx b/src/Panel.jsx index 8a438ed..4e658ae 100644 --- a/src/Panel.jsx +++ b/src/Panel.jsx @@ -49,8 +49,11 @@ module.exports = createClass({ return (