forked from ant-design/ant-design
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
78 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# 基本 | ||
|
||
- order: 0 | ||
|
||
最简单的用法。 | ||
|
||
--- | ||
|
||
````jsx | ||
var Breadcrumb = antd.Breadcrumb; | ||
|
||
React.render( | ||
<Breadcrumb> | ||
<Breadcrumb.Item href="">首页</Breadcrumb.Item> | ||
<Breadcrumb.Item href="">应用列表</Breadcrumb.Item> | ||
<Breadcrumb.Item>应用</Breadcrumb.Item> | ||
</Breadcrumb> | ||
, document.getElementById('components-breadcrumb-demo-basic')); | ||
```` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
'use strict'; | ||
|
||
import React from 'react'; | ||
|
||
let prefixCls = 'ant-breadcrumb'; | ||
|
||
let BreadcrumbItem = React.createClass({ | ||
render() { | ||
var link = <a className={prefixCls + '-link'} {...this.props}>{this.props.children}</a>; | ||
var slash = <span className={prefixCls + '-slash'}>/</span>; | ||
if (typeof this.props.href === 'undefined') { | ||
slash = ''; | ||
link = <span className={prefixCls + '-link'} {...this.props}>{this.props.children}</span>; | ||
} | ||
return ( | ||
<span> | ||
{link} | ||
{slash} | ||
</span> | ||
); | ||
} | ||
}); | ||
|
||
let Breadcrumb = React.createClass({ | ||
render() { | ||
return ( | ||
<div className={prefixCls}> | ||
{this.props.children} | ||
</div> | ||
); | ||
} | ||
}); | ||
|
||
Breadcrumb.Item = BreadcrumbItem; | ||
export default Breadcrumb; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# BreadCrumb | ||
|
||
- category: CSS | ||
- category: Components | ||
- chinese: 面包屑 | ||
|
||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
@breadcrumbPrefixCls: ant-breadcrumb; | ||
|
||
.@{breadcrumbPrefixCls} { | ||
color: #999; | ||
font-size: 12px; | ||
|
||
a&-link { | ||
color: #666; | ||
} | ||
|
||
> span:last-child { | ||
font-weight: bold; | ||
color: #666; | ||
} | ||
|
||
&-slash { | ||
margin: 0 8px; | ||
color: #d9d9d9; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,5 @@ | |
@import "form"; | ||
@import "loading"; | ||
@import "progress"; | ||
@import "steps"; | ||
@import "steps"; | ||
@import "breadcrumb"; |