|
@ -126,28 +126,28 @@ describe('ConfigProvider', () => { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Alert
|
|
|
// Alert
|
|
|
testPair('Alert', props => ( |
|
|
testPair('Alert', (props) => ( |
|
|
<Alert {...props} message="Bamboo is Little Light" type="success" /> |
|
|
<Alert {...props} message="Bamboo is Little Light" type="success" /> |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Anchor
|
|
|
// Anchor
|
|
|
testPair('Anchor', props => ( |
|
|
testPair('Anchor', (props) => ( |
|
|
<Anchor {...props}> |
|
|
<Anchor {...props}> |
|
|
<Anchor.Link {...props} href="#bamboo" title="Little Light" /> |
|
|
<Anchor.Link {...props} href="#bamboo" title="Little Light" /> |
|
|
</Anchor> |
|
|
</Anchor> |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// AutoComplete
|
|
|
// AutoComplete
|
|
|
testPair('AutoComplete', props => <AutoComplete {...props} />); |
|
|
testPair('AutoComplete', (props) => <AutoComplete {...props} />); |
|
|
|
|
|
|
|
|
// Avatar
|
|
|
// Avatar
|
|
|
testPair('Avatar', props => <Avatar {...props} />); |
|
|
testPair('Avatar', (props) => <Avatar {...props} />); |
|
|
|
|
|
|
|
|
// BackTop
|
|
|
// BackTop
|
|
|
testPair('BackTop', props => <BackTop visible {...props} />); |
|
|
testPair('BackTop', (props) => <BackTop visible {...props} />); |
|
|
|
|
|
|
|
|
// Badge
|
|
|
// Badge
|
|
|
testPair('Badge', props => { |
|
|
testPair('Badge', (props) => { |
|
|
const newProps = { ...props }; |
|
|
const newProps = { ...props }; |
|
|
|
|
|
|
|
|
// Hook for additional `scrollNumberPrefixCls` prop
|
|
|
// Hook for additional `scrollNumberPrefixCls` prop
|
|
@ -168,7 +168,7 @@ describe('ConfigProvider', () => { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
// Breadcrumb
|
|
|
// Breadcrumb
|
|
|
testPair('Breadcrumb', props => ( |
|
|
testPair('Breadcrumb', (props) => ( |
|
|
<Breadcrumb {...props}> |
|
|
<Breadcrumb {...props}> |
|
|
<Breadcrumb.Item {...props}>Bamboo</Breadcrumb.Item> |
|
|
<Breadcrumb.Item {...props}>Bamboo</Breadcrumb.Item> |
|
|
<Breadcrumb.Item {...props}>Light</Breadcrumb.Item> |
|
|
<Breadcrumb.Item {...props}>Light</Breadcrumb.Item> |
|
@ -176,7 +176,7 @@ describe('ConfigProvider', () => { |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Button
|
|
|
// Button
|
|
|
testPair('Button', props => ( |
|
|
testPair('Button', (props) => ( |
|
|
<div> |
|
|
<div> |
|
|
<Button {...props}>Bamboo</Button> |
|
|
<Button {...props}>Bamboo</Button> |
|
|
<Button.Group {...props}> |
|
|
<Button.Group {...props}> |
|
@ -187,7 +187,7 @@ describe('ConfigProvider', () => { |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Calendar
|
|
|
// Calendar
|
|
|
testPair('Calendar', props => ( |
|
|
testPair('Calendar', (props) => ( |
|
|
<div> |
|
|
<div> |
|
|
<Calendar {...props} value={dayjs('2000-09-03')} mode="month" /> |
|
|
<Calendar {...props} value={dayjs('2000-09-03')} mode="month" /> |
|
|
<Calendar {...props} value={dayjs('2000-09-03')} mode="year" /> |
|
|
<Calendar {...props} value={dayjs('2000-09-03')} mode="year" /> |
|
@ -195,7 +195,7 @@ describe('ConfigProvider', () => { |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Card
|
|
|
// Card
|
|
|
testPair('Card', props => ( |
|
|
testPair('Card', (props) => ( |
|
|
<Card {...props}> |
|
|
<Card {...props}> |
|
|
<Card.Grid {...props}> |
|
|
<Card.Grid {...props}> |
|
|
<Card.Meta {...props} /> |
|
|
<Card.Meta {...props} /> |
|
@ -204,7 +204,7 @@ describe('ConfigProvider', () => { |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Carousel
|
|
|
// Carousel
|
|
|
testPair('Carousel', props => ( |
|
|
testPair('Carousel', (props) => ( |
|
|
<Carousel {...props}> |
|
|
<Carousel {...props}> |
|
|
<div> |
|
|
<div> |
|
|
<h3>Bamboo</h3> |
|
|
<h3>Bamboo</h3> |
|
@ -216,17 +216,17 @@ describe('ConfigProvider', () => { |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Cascader
|
|
|
// Cascader
|
|
|
testPair('Cascader', props => <Cascader {...props} options={[]} showSearch />); |
|
|
testPair('Cascader', (props) => <Cascader {...props} options={[]} showSearch />); |
|
|
|
|
|
|
|
|
// Checkbox
|
|
|
// Checkbox
|
|
|
testPair('Checkbox', props => ( |
|
|
testPair('Checkbox', (props) => ( |
|
|
<Checkbox.Group {...props}> |
|
|
<Checkbox.Group {...props}> |
|
|
<Checkbox {...props}>Bamboo</Checkbox> |
|
|
<Checkbox {...props}>Bamboo</Checkbox> |
|
|
</Checkbox.Group> |
|
|
</Checkbox.Group> |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Collapse
|
|
|
// Collapse
|
|
|
testPair('Collapse', props => ( |
|
|
testPair('Collapse', (props) => ( |
|
|
<Collapse {...props}> |
|
|
<Collapse {...props}> |
|
|
<Collapse.Panel key="Collapse" header="Bamboo"> |
|
|
<Collapse.Panel key="Collapse" header="Bamboo"> |
|
|
<p>Light</p> |
|
|
<p>Light</p> |
|
@ -236,28 +236,28 @@ describe('ConfigProvider', () => { |
|
|
|
|
|
|
|
|
// DatePicker
|
|
|
// DatePicker
|
|
|
describe('DatePicker', () => { |
|
|
describe('DatePicker', () => { |
|
|
testPair('DatePicker', props => ( |
|
|
testPair('DatePicker', (props) => ( |
|
|
<div> |
|
|
<div> |
|
|
<DatePicker {...props} /> |
|
|
<DatePicker {...props} /> |
|
|
</div> |
|
|
</div> |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// RangePicker
|
|
|
// RangePicker
|
|
|
testPair('RangePicker', props => ( |
|
|
testPair('RangePicker', (props) => ( |
|
|
<div> |
|
|
<div> |
|
|
<DatePicker.RangePicker {...props} /> |
|
|
<DatePicker.RangePicker {...props} /> |
|
|
</div> |
|
|
</div> |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// MonthPicker
|
|
|
// MonthPicker
|
|
|
testPair('MonthPicker', props => ( |
|
|
testPair('MonthPicker', (props) => ( |
|
|
<div> |
|
|
<div> |
|
|
<DatePicker.MonthPicker {...props} /> |
|
|
<DatePicker.MonthPicker {...props} /> |
|
|
</div> |
|
|
</div> |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// WeekPicker
|
|
|
// WeekPicker
|
|
|
testPair('WeekPicker', props => ( |
|
|
testPair('WeekPicker', (props) => ( |
|
|
<div> |
|
|
<div> |
|
|
<DatePicker.WeekPicker {...props} /> |
|
|
<DatePicker.WeekPicker {...props} /> |
|
|
</div> |
|
|
</div> |
|
@ -265,19 +265,19 @@ describe('ConfigProvider', () => { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
// Empty
|
|
|
// Empty
|
|
|
testPair('Empty', props => <Empty {...props} />); |
|
|
testPair('Empty', (props) => <Empty {...props} />); |
|
|
|
|
|
|
|
|
// Divider
|
|
|
// Divider
|
|
|
testPair('Divider', props => <Divider {...props} />); |
|
|
testPair('Divider', (props) => <Divider {...props} />); |
|
|
|
|
|
|
|
|
// Drawer
|
|
|
// Drawer
|
|
|
testPair('Drawer', props => <Drawer {...props} open getContainer={false} />); |
|
|
testPair('Drawer', (props) => <Drawer {...props} open getContainer={false} />); |
|
|
|
|
|
|
|
|
// Dropdown
|
|
|
// Dropdown
|
|
|
testPair('Dropdown', props => <Dropdown.Button {...props}>Light</Dropdown.Button>); |
|
|
testPair('Dropdown', (props) => <Dropdown.Button {...props}>Light</Dropdown.Button>); |
|
|
|
|
|
|
|
|
// Form
|
|
|
// Form
|
|
|
testPair('Form', props => ( |
|
|
testPair('Form', (props) => ( |
|
|
<Form {...props}> |
|
|
<Form {...props}> |
|
|
<Form.Item {...props} validateStatus="error" help="Bamboo is Light"> |
|
|
<Form.Item {...props} validateStatus="error" help="Bamboo is Light"> |
|
|
<Input {...props} /> |
|
|
<Input {...props} /> |
|
@ -286,7 +286,7 @@ describe('ConfigProvider', () => { |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Grid
|
|
|
// Grid
|
|
|
testPair('Grid', props => { |
|
|
testPair('Grid', (props) => { |
|
|
const rowProps: { prefixCls?: string } = {}; |
|
|
const rowProps: { prefixCls?: string } = {}; |
|
|
const colProps: { prefixCls?: string } = {}; |
|
|
const colProps: { prefixCls?: string } = {}; |
|
|
if (props.prefixCls) { |
|
|
if (props.prefixCls) { |
|
@ -302,7 +302,7 @@ describe('ConfigProvider', () => { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
// Input
|
|
|
// Input
|
|
|
testPair('Input', props => ( |
|
|
testPair('Input', (props) => ( |
|
|
<div> |
|
|
<div> |
|
|
<Input.Group {...props}> |
|
|
<Input.Group {...props}> |
|
|
<Input {...props} /> |
|
|
<Input {...props} /> |
|
@ -314,10 +314,10 @@ describe('ConfigProvider', () => { |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// InputNumber
|
|
|
// InputNumber
|
|
|
testPair('InputNumber', props => <InputNumber {...props} />); |
|
|
testPair('InputNumber', (props) => <InputNumber {...props} />); |
|
|
|
|
|
|
|
|
// Layout
|
|
|
// Layout
|
|
|
testPair('Layout', props => { |
|
|
testPair('Layout', (props) => { |
|
|
const siderProps: { prefixCls?: string } = {}; |
|
|
const siderProps: { prefixCls?: string } = {}; |
|
|
const headerProps: { prefixCls?: string } = {}; |
|
|
const headerProps: { prefixCls?: string } = {}; |
|
|
const contentProps: { prefixCls?: string } = {}; |
|
|
const contentProps: { prefixCls?: string } = {}; |
|
@ -342,7 +342,7 @@ describe('ConfigProvider', () => { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
// List
|
|
|
// List
|
|
|
testPair('List', props => ( |
|
|
testPair('List', (props) => ( |
|
|
<List |
|
|
<List |
|
|
{...props} |
|
|
{...props} |
|
|
itemLayout="horizontal" |
|
|
itemLayout="horizontal" |
|
@ -361,7 +361,7 @@ describe('ConfigProvider', () => { |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Menu
|
|
|
// Menu
|
|
|
testPair('Menu', props => ( |
|
|
testPair('Menu', (props) => ( |
|
|
<Menu {...props} defaultOpenKeys={['bamboo']} mode="inline"> |
|
|
<Menu {...props} defaultOpenKeys={['bamboo']} mode="inline"> |
|
|
<Menu.SubMenu {...props} key="bamboo" title="bamboo"> |
|
|
<Menu.SubMenu {...props} key="bamboo" title="bamboo"> |
|
|
<Menu.ItemGroup {...props} key="g1" title="Item 1"> |
|
|
<Menu.ItemGroup {...props} key="g1" title="Item 1"> |
|
@ -374,7 +374,7 @@ describe('ConfigProvider', () => { |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Modal
|
|
|
// Modal
|
|
|
testPair('Modal', props => ( |
|
|
testPair('Modal', (props) => ( |
|
|
<div> |
|
|
<div> |
|
|
<Modal {...props} open getContainer={false}> |
|
|
<Modal {...props} open getContainer={false}> |
|
|
Bamboo is Little Light |
|
|
Bamboo is Little Light |
|
@ -383,7 +383,7 @@ describe('ConfigProvider', () => { |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Pagination
|
|
|
// Pagination
|
|
|
testPair('Pagination', props => ( |
|
|
testPair('Pagination', (props) => ( |
|
|
<div> |
|
|
<div> |
|
|
<Pagination showSizeChanger showQuickJumper {...props} /> |
|
|
<Pagination showSizeChanger showQuickJumper {...props} /> |
|
|
<Pagination size="small" showSizeChanger showQuickJumper {...props} /> |
|
|
<Pagination size="small" showSizeChanger showQuickJumper {...props} /> |
|
@ -391,7 +391,7 @@ describe('ConfigProvider', () => { |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Popconfirm
|
|
|
// Popconfirm
|
|
|
testPair('Popconfirm', props => ( |
|
|
testPair('Popconfirm', (props) => ( |
|
|
<div> |
|
|
<div> |
|
|
<Popconfirm {...props} open> |
|
|
<Popconfirm {...props} open> |
|
|
<span>Bamboo</span> |
|
|
<span>Bamboo</span> |
|
@ -400,7 +400,7 @@ describe('ConfigProvider', () => { |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Popover
|
|
|
// Popover
|
|
|
testPair('Popover', props => ( |
|
|
testPair('Popover', (props) => ( |
|
|
<div> |
|
|
<div> |
|
|
<Popover {...props} open> |
|
|
<Popover {...props} open> |
|
|
<span>Light</span> |
|
|
<span>Light</span> |
|
@ -409,10 +409,10 @@ describe('ConfigProvider', () => { |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Progress
|
|
|
// Progress
|
|
|
testPair('Progress', props => <Progress {...props} />); |
|
|
testPair('Progress', (props) => <Progress {...props} />); |
|
|
|
|
|
|
|
|
// Radio
|
|
|
// Radio
|
|
|
testPair('Radio', props => ( |
|
|
testPair('Radio', (props) => ( |
|
|
<div> |
|
|
<div> |
|
|
<Radio.Group {...props}> |
|
|
<Radio.Group {...props}> |
|
|
<Radio {...props}>Bamboo</Radio> |
|
|
<Radio {...props}>Bamboo</Radio> |
|
@ -424,10 +424,10 @@ describe('ConfigProvider', () => { |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Rate
|
|
|
// Rate
|
|
|
testPair('Rate', props => <Rate {...props} />); |
|
|
testPair('Rate', (props) => <Rate {...props} />); |
|
|
|
|
|
|
|
|
// Select
|
|
|
// Select
|
|
|
testPair('Select', props => ( |
|
|
testPair('Select', (props) => ( |
|
|
<Select {...props} open> |
|
|
<Select {...props} open> |
|
|
<Select.OptGroup key="grp"> |
|
|
<Select.OptGroup key="grp"> |
|
|
<Select.Option key="Bamboo">Light</Select.Option> |
|
|
<Select.Option key="Bamboo">Light</Select.Option> |
|
@ -436,10 +436,10 @@ describe('ConfigProvider', () => { |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Skeleton
|
|
|
// Skeleton
|
|
|
testPair('Skeleton', props => <Skeleton title avatar paragraph {...props} />); |
|
|
testPair('Skeleton', (props) => <Skeleton title avatar paragraph {...props} />); |
|
|
|
|
|
|
|
|
// Slider
|
|
|
// Slider
|
|
|
testPair('Slider', props => { |
|
|
testPair('Slider', (props) => { |
|
|
const myProps = { ...props }; |
|
|
const myProps = { ...props }; |
|
|
const tooltip: SliderTooltipProps = { |
|
|
const tooltip: SliderTooltipProps = { |
|
|
open: true, |
|
|
open: true, |
|
@ -452,13 +452,13 @@ describe('ConfigProvider', () => { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
// Spin
|
|
|
// Spin
|
|
|
testPair('Spin', props => <Spin {...props} />); |
|
|
testPair('Spin', (props) => <Spin {...props} />); |
|
|
|
|
|
|
|
|
// Statistic
|
|
|
// Statistic
|
|
|
testPair('Statistic', props => <Statistic {...props} value={0} />); |
|
|
testPair('Statistic', (props) => <Statistic {...props} value={0} />); |
|
|
|
|
|
|
|
|
// Steps
|
|
|
// Steps
|
|
|
testPair('Steps', props => { |
|
|
testPair('Steps', (props) => { |
|
|
const myProps = { ...props }; |
|
|
const myProps = { ...props }; |
|
|
if (props.prefixCls) { |
|
|
if (props.prefixCls) { |
|
|
myProps.iconPrefix = 'prefixIcon'; |
|
|
myProps.iconPrefix = 'prefixIcon'; |
|
@ -477,10 +477,10 @@ describe('ConfigProvider', () => { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
// Switch
|
|
|
// Switch
|
|
|
testPair('Switch', props => <Switch {...props} />); |
|
|
testPair('Switch', (props) => <Switch {...props} />); |
|
|
|
|
|
|
|
|
// Table
|
|
|
// Table
|
|
|
testPair('Table', props => { |
|
|
testPair('Table', (props) => { |
|
|
const columns: ColumnsType<any> = [ |
|
|
const columns: ColumnsType<any> = [ |
|
|
{ |
|
|
{ |
|
|
title: 'Name', |
|
|
title: 'Name', |
|
@ -508,14 +508,14 @@ describe('ConfigProvider', () => { |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
// Tabs
|
|
|
// Tabs
|
|
|
testPair('Tabs', props => ( |
|
|
testPair('Tabs', (props) => ( |
|
|
<Tabs {...props}> |
|
|
<Tabs {...props}> |
|
|
<Tabs.TabPane tab="Bamboo" key="Light" /> |
|
|
<Tabs.TabPane tab="Bamboo" key="Light" /> |
|
|
</Tabs> |
|
|
</Tabs> |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Tags
|
|
|
// Tags
|
|
|
testPair('Tags', props => ( |
|
|
testPair('Tags', (props) => ( |
|
|
<div> |
|
|
<div> |
|
|
<Tag {...props}>Bamboo</Tag> |
|
|
<Tag {...props}>Bamboo</Tag> |
|
|
<Tag.CheckableTag {...props}>Light</Tag.CheckableTag> |
|
|
<Tag.CheckableTag {...props}>Light</Tag.CheckableTag> |
|
@ -523,29 +523,29 @@ describe('ConfigProvider', () => { |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// TimePicker
|
|
|
// TimePicker
|
|
|
testPair('TimePicker', props => ( |
|
|
testPair('TimePicker', (props) => ( |
|
|
<TimePicker {...props} open defaultOpenValue={dayjs('00:00:00', 'HH:mm:ss')} /> |
|
|
<TimePicker {...props} open defaultOpenValue={dayjs('00:00:00', 'HH:mm:ss')} /> |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Timeline
|
|
|
// Timeline
|
|
|
testPair('Timeline', props => ( |
|
|
testPair('Timeline', (props) => ( |
|
|
<Timeline {...props}> |
|
|
<Timeline {...props}> |
|
|
<Timeline.Item {...props}>Bamboo</Timeline.Item> |
|
|
<Timeline.Item {...props}>Bamboo</Timeline.Item> |
|
|
</Timeline> |
|
|
</Timeline> |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Tooltip
|
|
|
// Tooltip
|
|
|
testPair('Tooltip', props => ( |
|
|
testPair('Tooltip', (props) => ( |
|
|
<Tooltip {...props} title="Bamboo" open> |
|
|
<Tooltip {...props} title="Bamboo" open> |
|
|
<span>Light</span> |
|
|
<span>Light</span> |
|
|
</Tooltip> |
|
|
</Tooltip> |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Transfer
|
|
|
// Transfer
|
|
|
testPair('Transfer', props => <Transfer {...props} dataSource={[]} />); |
|
|
testPair('Transfer', (props) => <Transfer {...props} dataSource={[]} />); |
|
|
|
|
|
|
|
|
// Tree
|
|
|
// Tree
|
|
|
testPair('Tree', props => ( |
|
|
testPair('Tree', (props) => ( |
|
|
<div> |
|
|
<div> |
|
|
<Tree {...props}> |
|
|
<Tree {...props}> |
|
|
<Tree.TreeNode title="bamboo" /> |
|
|
<Tree.TreeNode title="bamboo" /> |
|
@ -557,14 +557,14 @@ describe('ConfigProvider', () => { |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// TreeSelect
|
|
|
// TreeSelect
|
|
|
testPair('TreeSelect', props => ( |
|
|
testPair('TreeSelect', (props) => ( |
|
|
<TreeSelect {...props} open> |
|
|
<TreeSelect {...props} open> |
|
|
<TreeSelect.TreeNode title="bamboo" value="light" /> |
|
|
<TreeSelect.TreeNode title="bamboo" value="light" /> |
|
|
</TreeSelect> |
|
|
</TreeSelect> |
|
|
)); |
|
|
)); |
|
|
|
|
|
|
|
|
// Upload
|
|
|
// Upload
|
|
|
testPair('Upload', props => ( |
|
|
testPair('Upload', (props) => ( |
|
|
<Upload {...props} defaultFileList={[{ uid: '1', name: 'xxx.png', status: 'done' }]}> |
|
|
<Upload {...props} defaultFileList={[{ uid: '1', name: 'xxx.png', status: 'done' }]}> |
|
|
<span /> |
|
|
<span /> |
|
|
</Upload> |
|
|
</Upload> |
|
|