feat: import animal-island-ui snapshot
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
import React from 'react';
|
||||
import { Footer as FooterComponent } from '../../../src';
|
||||
import { CodeBlock, ApiTable, ApiRow, sectionStyle, sectionTitleStyle, tagStyle, demoBodyStyle, labelStyle } from '../../tools';
|
||||
|
||||
const FooterDemo: React.FC = () => {
|
||||
|
||||
return (
|
||||
<div style={sectionStyle}>
|
||||
<div style={sectionTitleStyle}>
|
||||
Footer <span style={tagStyle}>底部装饰</span>
|
||||
</div>
|
||||
<div style={labelStyle}>
|
||||
Footer 组件 — 页面底部装饰图片,支持 sea(海)和 tree(树)两种类型。
|
||||
</div>
|
||||
<div style={{ ...demoBodyStyle, padding: '40px 0' }}>
|
||||
<div style={labelStyle}>tree 类型(默认)</div>
|
||||
<FooterComponent />
|
||||
</div>
|
||||
<div style={{ ...demoBodyStyle, padding: '40px 0' }}>
|
||||
<div style={labelStyle}>sea 类型</div>
|
||||
<FooterComponent type="sea" />
|
||||
</div>
|
||||
<CodeBlock
|
||||
code={`import React from 'react';
|
||||
import { Footer } from 'animal-island-ui';
|
||||
|
||||
const App = () => (
|
||||
<div>
|
||||
<Footer />
|
||||
<Footer type="sea" />
|
||||
</div>
|
||||
);`}
|
||||
/>
|
||||
<ApiTable rows={FOOTER_API} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const FOOTER_API: ApiRow[] = [
|
||||
{ prop: 'type', desc: 'Footer 类型', type: "'sea' | 'tree'", defaultVal: "'tree'" },
|
||||
{ prop: 'className', desc: '自定义类名', type: 'string', defaultVal: '-' },
|
||||
{ prop: 'style', desc: '自定义样式', type: 'CSSProperties', defaultVal: '-' },
|
||||
];
|
||||
|
||||
export default FooterDemo;
|
||||
Reference in New Issue
Block a user