Files
animal-island-ui/demo/components/Time/index.tsx
T

40 lines
1.1 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import React from 'react';
import { Time as TimeComponent } from '../../../src';
import { CodeBlock, ApiTable, ApiRow, sectionStyle, sectionTitleStyle, tagStyle, demoBodyStyle, labelStyle } from '../../tools';
const TimeDemo: React.FC = () => (
<div style={sectionStyle}>
<div style={sectionTitleStyle}>
Time <span style={tagStyle}></span>
</div>
<div style={labelStyle}>
Time HUD
</div>
<div style={demoBodyStyle}>
<TimeComponent />
</div>
<CodeBlock
code={`import React from 'react';
import { Time } from 'animal-island-ui';
const App = () => {
return (
<div>
{/* 时间显示 */}
<Time />
</div>
);
};
export default App;`}
/>
<ApiTable rows={TIME_API} />
</div>
);
const TIME_API: ApiRow[] = [
{ prop: 'className', desc: '自定义类名', type: 'string', defaultVal: '-' },
];
export default TimeDemo;