Initial import
This commit is contained in:
33
src/app/main/pages/ApisPage.tsx
Executable file
33
src/app/main/pages/ApisPage.tsx
Executable file
@@ -0,0 +1,33 @@
|
||||
import { Card, Typography } from 'antd';
|
||||
import { ComponentSamplesLayout } from '../../../features/layout/component-sample-gallery';
|
||||
import { SampleWidgetsLayout } from '../../../features/layout/widget-sample-gallery';
|
||||
import { useMainLayoutContext } from '../layout/MainLayoutContext';
|
||||
|
||||
const { Paragraph } = Typography;
|
||||
const HIDDEN_COMPONENT_IDS = ['search-command-modal', 'window-ui'];
|
||||
|
||||
export function ApisPage() {
|
||||
const { selectedApiMenu, componentSampleEntries, widgetSampleEntries } = useMainLayoutContext();
|
||||
|
||||
return (
|
||||
<div className="app-main-panel">
|
||||
<Card
|
||||
title={selectedApiMenu === 'components' ? 'APIs / Components' : 'APIs / Widgets'}
|
||||
className="app-main-card"
|
||||
bordered={false}
|
||||
>
|
||||
<Paragraph className="app-main-copy">
|
||||
{selectedApiMenu === 'components'
|
||||
? '공통 UI 컴포넌트 샘플과 확장 샘플을 확인합니다.'
|
||||
: '공통 위젯 샘플을 확인합니다.'}
|
||||
</Paragraph>
|
||||
|
||||
{selectedApiMenu === 'components' ? (
|
||||
<ComponentSamplesLayout entries={componentSampleEntries} excludeComponentIds={HIDDEN_COMPONENT_IDS} />
|
||||
) : (
|
||||
<SampleWidgetsLayout entries={widgetSampleEntries} />
|
||||
)}
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user