import style from '../AdminTable/Admin.module.css'; import type { CollapseProps } from 'antd'; import { Button, Collapse } from 'antd'; import styled from 'styled-components'; type IProps = { readonly data: string; readonly index: number; readonly name: string; readonly onClick: (name: string) => void; }; const Wrapper = styled.div` display: flex; justify-content: space-between; `; export default function AdminRow(props: IProps) { const { data, index, name, onClick } = props; const handleClick = () => { onClick(name); }; const items: CollapseProps['items'] = [ { children:
{data}
, key: index.toString(), label: data, }, ]; return (