gitscope
← marzneshin / v0.7.1 / dashboard/src/modules/hosts/components/settings-section.tsx
https://dev.kronoz.win/r/marzneshin.git
dashboard/src/modules/hosts/components/settings-section.tsx · TypeScript
Blame Raw
 1import { AccordionItem, AccordionTrigger, AccordionContent } from '@marzneshin/common/components';
 2import { FC, PropsWithChildren } from "react";
 3
 4interface SettingSectionProps {
 5    value: string;
 6    triggerText: string;
 7}
 8
 9export const SettingSection: FC<SettingSectionProps & PropsWithChildren> = ({
10    value, triggerText, children
11}) => {
12    return (
13        <AccordionItem
14            className="data-[state=open]:bg-muted/40 rounded-lg data-[state=close]:border-muted data-[state=open]:border-muted-foreground border-1 px-3"
15            value={value}
16        >
17            <AccordionTrigger>{triggerText}</AccordionTrigger>
18            <AccordionContent>{children}</AccordionContent>
19        </AccordionItem>
20    );
21}