mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-08 01:53:34 +08:00
Merge branch 'master' into eugene-matvejev-patch-4
This commit is contained in:
commit
b2fa4280f3
@ -43,7 +43,7 @@ interface CollapseInterface extends React.FC<CollapseProps> {
|
||||
|
||||
const Collapse: CollapseInterface = props => {
|
||||
const { getPrefixCls, direction } = React.useContext(ConfigContext);
|
||||
const { prefixCls: customizePrefixCls, className = '', bordered, ghost } = props;
|
||||
const { prefixCls: customizePrefixCls, className = '', bordered = true, ghost } = props;
|
||||
const prefixCls = getPrefixCls('collapse', customizePrefixCls);
|
||||
|
||||
const getIconPosition = () => {
|
||||
@ -83,6 +83,7 @@ const Collapse: CollapseInterface = props => {
|
||||
<RcCollapse
|
||||
openAnimation={openAnimation}
|
||||
{...props}
|
||||
bordered={bordered}
|
||||
expandIcon={renderExpandIcon}
|
||||
prefixCls={prefixCls}
|
||||
className={collapseClassName}
|
||||
@ -92,8 +93,4 @@ const Collapse: CollapseInterface = props => {
|
||||
|
||||
Collapse.Panel = CollapsePanel;
|
||||
|
||||
Collapse.defaultProps = {
|
||||
bordered: true,
|
||||
};
|
||||
|
||||
export default Collapse;
|
||||
|
@ -1,6 +1,5 @@
|
||||
import * as React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import omit from 'omit.js';
|
||||
import { ConfigContext } from '../config-provider';
|
||||
|
||||
export interface TimelineItemProps {
|
||||
@ -20,18 +19,18 @@ export interface TimeLineItemProps extends TimelineItemProps {
|
||||
__deprecated_do_not_use_it__?: any; // eslint-disable-line camelcase
|
||||
}
|
||||
|
||||
const TimelineItem: React.FC<TimelineItemProps> = props => {
|
||||
const { getPrefixCls } = React.useContext(ConfigContext);
|
||||
const {
|
||||
const TimelineItem: React.FC<TimelineItemProps> = ({
|
||||
prefixCls: customizePrefixCls,
|
||||
className,
|
||||
color,
|
||||
children,
|
||||
pending,
|
||||
color = 'blue',
|
||||
dot,
|
||||
pending = false,
|
||||
position, /** dead, but do not pass in <li {...omit()} */
|
||||
label,
|
||||
children,
|
||||
...restProps
|
||||
} = props;
|
||||
}) => {
|
||||
const { getPrefixCls } = React.useContext(ConfigContext);
|
||||
|
||||
const prefixCls = getPrefixCls('timeline', customizePrefixCls);
|
||||
const itemClassName = classNames(
|
||||
@ -49,7 +48,7 @@ const TimelineItem: React.FC<TimelineItemProps> = props => {
|
||||
});
|
||||
|
||||
return (
|
||||
<li {...omit(restProps, ['position'])} className={itemClassName}>
|
||||
<li {...restProps} className={itemClassName}>
|
||||
{label && <div className={`${prefixCls}-item-label`}>{label}</div>}
|
||||
<div className={`${prefixCls}-item-tail`} />
|
||||
<div
|
||||
@ -63,10 +62,4 @@ const TimelineItem: React.FC<TimelineItemProps> = props => {
|
||||
);
|
||||
};
|
||||
|
||||
TimelineItem.defaultProps = {
|
||||
color: 'blue',
|
||||
pending: false,
|
||||
position: '',
|
||||
};
|
||||
|
||||
export default TimelineItem;
|
||||
|
@ -213,7 +213,8 @@ class Base extends React.Component<InternalBlockProps, BaseState> {
|
||||
};
|
||||
|
||||
// ================ Copy ================
|
||||
onCopyClick = () => {
|
||||
onCopyClick = (e: React.MouseEvent<HTMLDivElement>) => {
|
||||
e.preventDefault();
|
||||
const { children, copyable } = this.props;
|
||||
const copyConfig: CopyConfig = {
|
||||
...(typeof copyable === 'object' ? copyable : null),
|
||||
|
@ -25,7 +25,7 @@ title: Third-Party Libraries
|
||||
| Top Progress Bar | [nprogress](https://github.com/rstacruz/nprogress) |
|
||||
| i18n | [react-intl](https://github.com/yahoo/react-intl) |
|
||||
| Code highlight | [react-syntax-highlighter](https://github.com/conorhastings/react-syntax-highlighter) |
|
||||
| Markdown renderer | [react-markdown](http://rexxars.github.io/react-markdown/) |
|
||||
| Markdown renderer | [react-markdown](https://remarkjs.github.io/react-markdown/) |
|
||||
| Infinite Scroll | [react-virtualized](https://github.com/bvaughn/react-virtualized) [antd-table-infinity](https://github.com/Leonard-Li777/antd-table-infinity) |
|
||||
| Map | [react-google-maps](https://github.com/tomchentw/react-google-maps) [google-map-react](https://github.com/istarkov/google-map-react) [react-amap](https://github.com/ElemeFE/react-amap) |
|
||||
| Video | [react-player](https://github.com/CookPete/react-player) [video-react](https://github.com/video-react/video-react) [video.js](http://docs.videojs.com/tutorial-react.html) |
|
||||
|
@ -25,7 +25,7 @@ title: 社区精选组件
|
||||
| 顶部进度条 | [nprogress](https://github.com/rstacruz/nprogress) |
|
||||
| 应用国际化 | [react-intl](https://github.com/yahoo/react-intl) |
|
||||
| 代码高亮 | [react-syntax-highlighter](https://github.com/conorhastings/react-syntax-highlighter) |
|
||||
| Markdown 渲染 | [react-markdown](http://rexxars.github.io/react-markdown/) |
|
||||
| Markdown 渲染 | [react-markdown](https://remarkjs.github.io/react-markdown/) |
|
||||
| 无限滚动 | [react-virtualized](https://github.com/bvaughn/react-virtualized) [antd-table-infinity](https://github.com/Leonard-Li777/antd-table-infinity) |
|
||||
| 地图 | [react-google-maps](https://github.com/tomchentw/react-google-maps) [google-map-react](https://github.com/istarkov/google-map-react) [react-amap 高德](https://github.com/ElemeFE/react-amap) |
|
||||
| 视频播放 | [react-player](https://github.com/CookPete/react-player) [video-react](https://github.com/video-react/video-react) [video.js](http://docs.videojs.com/tutorial-react.html) |
|
||||
|
Loading…
Reference in New Issue
Block a user