remove type="ghost" from demo

This commit is contained in:
afc163 2017-02-04 22:35:33 +08:00
parent a5d69b893b
commit 0eb5c689a3
31 changed files with 59 additions and 60 deletions

View File

@ -277,13 +277,13 @@ exports[`test renders ./components/badge/demo/change.md correctly 1`] = `
<div
class="ant-btn-group">
<button
class="ant-btn ant-btn-ghost"
class="ant-btn"
type="button">
<i
class="anticon anticon-minus" />
</button>
<button
class="ant-btn ant-btn-ghost"
class="ant-btn"
type="button">
<i
class="anticon anticon-plus" />

View File

@ -46,10 +46,10 @@ const Test = React.createClass({
<a href="#" className="head-example" />
</Badge>
<ButtonGroup>
<Button type="ghost" onClick={this.decline}>
<Button onClick={this.decline}>
<Icon type="minus" />
</Button>
<Button type="ghost" onClick={this.increase}>
<Button onClick={this.increase}>
<Icon type="plus" />
</Button>
</ButtonGroup>

View File

@ -97,7 +97,7 @@ exports[`test renders ./components/button/demo/button-group.md correctly 1`] = `
</span>
</button>
<button
class="ant-btn ant-btn-ghost"
class="ant-btn"
type="button">
<span>
M
@ -188,14 +188,14 @@ exports[`test renders ./components/button/demo/disabled.md correctly 1`] = `
</button>
<br />
<button
class="ant-btn ant-btn-ghost"
class="ant-btn"
type="button">
<span>
Ghost
</span>
</button>
<button
class="ant-btn ant-btn-ghost"
class="ant-btn"
disabled=""
type="button">
<span>
@ -282,13 +282,13 @@ exports[`test renders ./components/button/demo/icon.md correctly 1`] = `
</button>
<br />
<button
class="ant-btn ant-btn-ghost ant-btn-circle ant-btn-icon-only"
class="ant-btn ant-btn-circle ant-btn-icon-only"
type="button">
<i
class="anticon anticon-search" />
</button>
<button
class="ant-btn ant-btn-ghost"
class="ant-btn"
type="button">
<i
class="anticon anticon-search" />
@ -364,14 +364,14 @@ exports[`test renders ./components/button/demo/multiple.md correctly 1`] = `
</span>
</button>
<button
class="ant-btn ant-btn-ghost"
class="ant-btn"
type="button">
<span>
secondary
</span>
</button>
<button
class="ant-btn ant-btn-ghost ant-dropdown-trigger"
class="ant-btn ant-dropdown-trigger"
type="button">
<span>
more

View File

@ -36,7 +36,7 @@ ReactDOM.render(
<ButtonGroup>
<Button type="primary">L</Button>
<Button>M</Button>
<Button type="ghost">M</Button>
<Button>M</Button>
<Button type="dashed">R</Button>
</ButtonGroup>

View File

@ -24,8 +24,8 @@ ReactDOM.render(
<Button>Default</Button>
<Button disabled>Default(disabled)</Button>
<br />
<Button type="ghost">Ghost</Button>
<Button type="ghost" disabled>Ghost(disabled)</Button>
<Button>Ghost</Button>
<Button disabled>Ghost(disabled)</Button>
<br />
<Button type="dashed">Dashed</Button>
<Button type="dashed" disabled>Dashed(disabled)</Button>

View File

@ -27,8 +27,8 @@ ReactDOM.render(
<Button shape="circle" icon="search" />
<Button icon="search">Search</Button>
<br />
<Button type="ghost" shape="circle" icon="search" />
<Button type="ghost" icon="search">Search</Button>
<Button shape="circle" icon="search" />
<Button icon="search">Search</Button>
<Button type="dashed" shape="circle" icon="search" />
<Button type="dashed" icon="search">Search</Button>
</div>,

View File

@ -32,9 +32,9 @@ const menu = (
ReactDOM.render(
<div>
<Button type="primary">primary</Button>
<Button type="ghost">secondary</Button>
<Button>secondary</Button>
<Dropdown overlay={menu}>
<Button type="ghost">
<Button>
more <Icon type="down" />
</Button>
</Dropdown>

View File

@ -13,14 +13,14 @@ exports[`test renders ./components/dropdown/demo/dropdown-button.md correctly 1`
<div
class="ant-btn-group ant-dropdown-button">
<button
class="ant-btn ant-btn-ghost"
class="ant-btn ant-btn-default"
type="button">
<span>
Dropdown
</span>
</button>
<button
class="ant-btn ant-btn-ghost ant-dropdown-trigger"
class="ant-btn ant-btn-default ant-dropdown-trigger"
type="button">
<i
class="anticon anticon-down" />
@ -30,7 +30,7 @@ exports[`test renders ./components/dropdown/demo/dropdown-button.md correctly 1`
class="ant-btn-group ant-dropdown-button"
style="margin-left:8px;">
<button
class="ant-btn ant-btn-ghost"
class="ant-btn ant-btn-default"
disabled=""
type="button">
<span>
@ -38,7 +38,7 @@ exports[`test renders ./components/dropdown/demo/dropdown-button.md correctly 1`
</span>
</button>
<button
class="ant-btn ant-btn-ghost ant-dropdown-trigger"
class="ant-btn ant-btn-default ant-dropdown-trigger"
disabled=""
type="button">
<i
@ -46,7 +46,7 @@ exports[`test renders ./components/dropdown/demo/dropdown-button.md correctly 1`
</button>
</div>
<button
class="ant-btn ant-btn-ghost ant-dropdown-trigger"
class="ant-btn ant-dropdown-trigger"
style="margin-left:8px;"
type="button">
<span>

View File

@ -36,18 +36,18 @@ const menu = (
ReactDOM.render(
<div>
<Dropdown.Button onClick={handleButtonClick} overlay={menu} type="ghost">
<Dropdown.Button onClick={handleButtonClick} overlay={menu}>
Dropdown
</Dropdown.Button>
<Dropdown.Button
onClick={handleButtonClick} overlay={menu}
type="ghost" disabled
disabled
style={{ marginLeft: 8 }}
>
Dropdown
</Dropdown.Button>
<Dropdown overlay={menu}>
<Button type="ghost" style={{ marginLeft: 8 }}>
<Button style={{ marginLeft: 8 }}>
Button <Icon type="down" />
</Button>
</Dropdown>

View File

@ -152,7 +152,7 @@ const Demo = Form.create()(React.createClass({
normalize: this.normFile,
})(
<Upload name="logo" action="/upload.do" listType="picture" onChange={this.handleUpload}>
<Button type="ghost">
<Button>
<Icon type="upload" /> Click to upload
</Button>
</Upload>

View File

@ -73,7 +73,7 @@ let App = React.createClass({
<FormItem wrapperCol={{ span: 14, offset: 6 }}>
<Button type="primary" onClick={this.handleSubmit}>Submit</Button>
&nbsp;&nbsp;&nbsp;
<Button type="ghost" onClick={this.handleReset}>Reset</Button>
<Button onClick={this.handleReset}>Reset</Button>
</FormItem>
</Form>
);

View File

@ -3,7 +3,7 @@ import ReactDOM from 'react-dom';
import Button from '../button';
export interface ActionButtonProps {
type: 'primary' | 'ghost' | 'dashed';
type?: 'primary' | 'dashed';
actionFn: Function;
closeModal: Function;
autoFocus?: Boolean;

View File

@ -125,7 +125,6 @@ export default class Modal extends React.Component<ModalProps, any> {
const defaultFooter = [
<Button
key="cancel"
type="ghost"
size="large"
onClick={this.handleCancel}
>

View File

@ -49,7 +49,7 @@ export default function confirm(config) {
if (props.okCancel) {
footer = (
<div className={`${prefixCls}-btns`}>
<ActionButton type="ghost" actionFn={props.onCancel} closeModal={close}>
<ActionButton actionFn={props.onCancel} closeModal={close}>
{props.cancelText}
</ActionButton>
<ActionButton type="primary" actionFn={props.onOk} closeModal={close} autoFocus>

View File

@ -51,7 +51,7 @@ const Test = React.createClass({
onOk={this.handleOk}
onCancel={this.handleCancel}
footer={[
<Button key="back" type="ghost" size="large" onClick={this.handleCancel}>Return</Button>,
<Button key="back" size="large" onClick={this.handleCancel}>Return</Button>,
<Button key="submit" type="primary" size="large" loading={this.state.loading} onClick={this.handleOk}>
Submit
</Button>,

View File

@ -99,7 +99,7 @@ export default class Popconfirm extends React.Component<PopconfirmProps, any> {
<div className={`${prefixCls}-message-title`}>{title}</div>
</div>
<div className={`${prefixCls}-buttons`}>
<Button onClick={this.cancel} type="ghost" size="small">{cancelText || '取消'}</Button>
<Button onClick={this.cancel} size="small">{cancelText || '取消'}</Button>
<Button onClick={this.confirm} type="primary" size="small">{okText || '确定'}</Button>
</div>
</div>

View File

@ -142,13 +142,13 @@ exports[`test renders ./components/progress/demo/circle-dynamic.md correctly 1`]
<div
class="ant-btn-group">
<button
class="ant-btn ant-btn-ghost ant-btn-icon-only"
class="ant-btn ant-btn-icon-only"
type="button">
<i
class="anticon anticon-minus" />
</button>
<button
class="ant-btn ant-btn-ghost ant-btn-icon-only"
class="ant-btn ant-btn-icon-only"
type="button">
<i
class="anticon anticon-plus" />
@ -286,13 +286,13 @@ exports[`test renders ./components/progress/demo/dynamic.md correctly 1`] = `
<div
class="ant-btn-group">
<button
class="ant-btn ant-btn-ghost ant-btn-icon-only"
class="ant-btn ant-btn-icon-only"
type="button">
<i
class="anticon anticon-minus" />
</button>
<button
class="ant-btn ant-btn-ghost ant-btn-icon-only"
class="ant-btn ant-btn-icon-only"
type="button">
<i
class="anticon anticon-plus" />

View File

@ -42,8 +42,8 @@ const MyProgress = React.createClass({
<div>
<Progress type="circle" percent={this.state.percent} />
<ButtonGroup>
<Button type="ghost" onClick={this.decline} icon="minus" />
<Button type="ghost" onClick={this.increase} icon="plus" />
<Button onClick={this.decline} icon="minus" />
<Button onClick={this.increase} icon="plus" />
</ButtonGroup>
</div>
);

View File

@ -42,8 +42,8 @@ const MyProgress = React.createClass({
<div>
<Progress percent={this.state.percent} />
<ButtonGroup>
<Button type="ghost" onClick={this.decline} icon="minus" />
<Button type="ghost" onClick={this.increase} icon="plus" />
<Button onClick={this.decline} icon="minus" />
<Button onClick={this.increase} icon="plus" />
</ButtonGroup>
</div>
);

View File

@ -65,7 +65,7 @@ class App extends React.Component {
{
this.state.current > 0
&&
<Button style={{ marginLeft: 8 }} type="ghost" onClick={() => this.prev()}>
<Button style={{ marginLeft: 8 }} onClick={() => this.prev()}>
Previous
</Button>
}

View File

@ -1862,7 +1862,7 @@ exports[`test renders ./components/table/demo/dynamic-settings.md correctly 1`]
exports[`test renders ./components/table/demo/edit-cell.md correctly 1`] = `
<div>
<button
class="ant-btn ant-btn-ghost editable-add-btn"
class="ant-btn editable-add-btn"
type="button">
<span>
Add
@ -6909,21 +6909,21 @@ exports[`test renders ./components/table/demo/reset-filter.md correctly 1`] = `
<div
class="table-operations">
<button
class="ant-btn ant-btn-ghost"
class="ant-btn"
type="button">
<span>
Sort age
</span>
</button>
<button
class="ant-btn ant-btn-ghost"
class="ant-btn"
type="button">
<span>
Clear filters
</span>
</button>
<button
class="ant-btn ant-btn-ghost"
class="ant-btn"
type="button">
<span>
Clear filters and sorters

View File

@ -145,7 +145,7 @@ class EditableTable extends React.Component {
const { dataSource } = this.state;
const columns = this.columns;
return (<div>
<Button className="editable-add-btn" type="ghost" onClick={this.handleAdd}>Add</Button>
<Button className="editable-add-btn" onClick={this.handleAdd}>Add</Button>
<Table bordered dataSource={dataSource} columns={columns} />
</div>);
}

View File

@ -115,9 +115,9 @@ const App = React.createClass({
return (
<div>
<div className="table-operations">
<Button type="ghost" onClick={this.setAgeSort}>Sort age</Button>
<Button type="ghost" onClick={this.clearFilters}>Clear filters</Button>
<Button type="ghost" onClick={this.clearAll}>Clear filters and sorters</Button>
<Button onClick={this.setAgeSort}>Sort age</Button>
<Button onClick={this.clearFilters}>Clear filters</Button>
<Button onClick={this.clearAll}>Clear filters and sorters</Button>
</div>
<Table columns={columns} dataSource={data} onChange={this.handleChange} />
</div>

View File

@ -198,7 +198,7 @@ exports[`test renders ./components/tabs/demo/custom-add-trigger.md correctly 1`]
<div
style="margin-bottom:16px;">
<button
class="ant-btn ant-btn-ghost"
class="ant-btn"
type="button">
<span>
ADD

View File

@ -59,7 +59,7 @@ const Demo = React.createClass({
return (
<div>
<div style={{ marginBottom: 16 }}>
<Button type="ghost" onClick={this.add}>ADD</Button>
<Button onClick={this.add}>ADD</Button>
</div>
<Tabs
hideAdd

View File

@ -53,7 +53,7 @@ exports[`test renders ./components/transfer/demo/advanced.md correctly 1`] = `
<div
class="ant-transfer-list-footer">
<button
class="ant-btn ant-btn-ghost ant-btn-sm"
class="ant-btn ant-btn-sm"
style="float:right;margin:5px;"
type="button">
<span>
@ -137,7 +137,7 @@ exports[`test renders ./components/transfer/demo/advanced.md correctly 1`] = `
<div
class="ant-transfer-list-footer">
<button
class="ant-btn ant-btn-ghost ant-btn-sm"
class="ant-btn ant-btn-sm"
style="float:right;margin:5px;"
type="button">
<span>

View File

@ -50,7 +50,7 @@ const App = React.createClass({
},
renderFooter() {
return (
<Button type="ghost" size="small" style={{ float: 'right', margin: 5 }}
<Button size="small" style={{ float: 'right', margin: 5 }}
onClick={this.getMock}
>
reload

View File

@ -36,7 +36,7 @@ const props = {
ReactDOM.render(
<Upload {...props}>
<Button type="ghost">
<Button>
<Icon type="upload" /> Click to Upload
</Button>
</Upload>

View File

@ -40,7 +40,7 @@ const props = {
ReactDOM.render(
<Upload {...props}>
<Button type="ghost">
<Button>
<Icon type="upload" /> Upload
</Button>
</Upload>

View File

@ -73,7 +73,7 @@ const MyUpload = React.createClass({
};
return (
<Upload {...props} fileList={this.state.fileList}>
<Button type="ghost">
<Button>
<Icon type="upload" /> upload
</Button>
</Upload>

View File

@ -38,14 +38,14 @@ const props = {
ReactDOM.render(
<div>
<Upload {...props}>
<Button type="ghost">
<Button>
<Icon type="upload" /> upload
</Button>
</Upload>
<br />
<br />
<Upload {...props} className="upload-list-inline">
<Button type="ghost">
<Button>
<Icon type="upload" /> upload
</Button>
</Upload>