gitscope
https://dev.kronoz.win/r/marzneshin.git
dashboard/src/modules/hosts/components/settings-section.tsx · v0.7.2
Source
1 7389ad0 Mardin 2y ago import { AccordionItem, AccordionTrigger, AccordionContent } from '@marzneshin/common/components';
2 d636f3f Dawsh 2y ago import { FC, PropsWithChildren } from "react";
3 d636f3f Dawsh 2y ago
4 d636f3f Dawsh 2y ago interface SettingSectionProps {
5 d636f3f Dawsh 2y ago value: string;
6 d636f3f Dawsh 2y ago triggerText: string;
7 d636f3f Dawsh 2y ago }
8 d636f3f Dawsh 2y ago
9 d636f3f Dawsh 2y ago export const SettingSection: FC<SettingSectionProps & PropsWithChildren> = ({
10 d636f3f Dawsh 2y ago value, triggerText, children
11 d636f3f Dawsh 2y ago }) => {
12 d636f3f Dawsh 2y ago return (
13 d636f3f Dawsh 2y ago <AccordionItem
14 d636f3f Dawsh 2y ago 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 d636f3f Dawsh 2y ago value={value}
16 d636f3f Dawsh 2y ago >
17 d636f3f Dawsh 2y ago <AccordionTrigger>{triggerText}</AccordionTrigger>
18 d636f3f Dawsh 2y ago <AccordionContent>{children}</AccordionContent>
19 d636f3f Dawsh 2y ago </AccordionItem>
20 d636f3f Dawsh 2y ago );
21 d636f3f Dawsh 2y ago }