mirror of
https://github.com/kmvan/x-prober.git
synced 2026-04-23 18:49:02 +08:00
completed modules
This commit is contained in:
28
src/Components/Module/components/item.tsx
Normal file
28
src/Components/Module/components/item.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import type { FC, ReactNode } from 'react';
|
||||
import { ModuleArrow } from '@/Components/Module/components/arrow.tsx';
|
||||
import styles from './item.module.scss';
|
||||
|
||||
const ModuleItemTitle: FC<{
|
||||
id: string;
|
||||
title: string;
|
||||
}> = ({ id, title }) => {
|
||||
return (
|
||||
<h2 className={styles.header}>
|
||||
<ModuleArrow id={id} isDown={false} />
|
||||
<span className={styles.title}>{title}</span>
|
||||
<ModuleArrow id={id} isDown />
|
||||
</h2>
|
||||
);
|
||||
};
|
||||
export const ModuleItem: FC<{
|
||||
id: string;
|
||||
title: string;
|
||||
children: ReactNode;
|
||||
}> = ({ id, title, children, ...props }) => {
|
||||
return (
|
||||
<div className={styles.main} id={id} {...props}>
|
||||
<ModuleItemTitle id={id} title={title} />
|
||||
<div className={styles.body}>{children}</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user