mirror of https://github.com/openspug/spug
U 优化Breadcrumb组件
parent
8fd9780250
commit
9a08f25161
|
@ -3,20 +3,18 @@
|
|||
* Copyright (c) <spug.dev@gmail.com>
|
||||
* Released under the AGPL-3.0 License.
|
||||
*/
|
||||
import React from "react";
|
||||
import React from 'react';
|
||||
import Editor from 'react-ace';
|
||||
import 'ace-builds/src-noconflict/ext-language_tools';
|
||||
import 'ace-builds/src-noconflict/mode-sh';
|
||||
import 'ace-builds/src-noconflict/mode-python';
|
||||
import 'ace-builds/src-noconflict/theme-tomorrow';
|
||||
import 'ace-builds/src-noconflict/snippets/sh';
|
||||
|
||||
export default function (props) {
|
||||
return (
|
||||
<Editor
|
||||
wrapEnabled
|
||||
theme="tomorrow"
|
||||
enableBasicAutocompletion={true}
|
||||
enableSnippets={true}
|
||||
fontSize={13}
|
||||
tabSize={2}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
|
|
|
@ -27,10 +27,12 @@ export default class extends React.Component {
|
|||
<Breadcrumb>
|
||||
{this.props.children}
|
||||
</Breadcrumb>
|
||||
<div className={styles.title}>
|
||||
<span>{title}</span>
|
||||
{this.props.extra}
|
||||
</div>
|
||||
{this.props.extra ? (
|
||||
<div className={styles.title}>
|
||||
<span>{title}</span>
|
||||
{this.props.extra}
|
||||
</div>
|
||||
) : null}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@
|
|||
|
||||
.breadcrumb {
|
||||
margin: -24px -24px 24px -24px;
|
||||
padding: 16px 24px 0 24px;
|
||||
padding: 16px 24px;
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #e8e8e8;
|
||||
|
||||
|
@ -147,9 +147,8 @@
|
|||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 9px;
|
||||
font-size: 20px;
|
||||
line-height: 50px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue