https://dev.kronoz.win/r/marzneshin.git
| 1 |
4708fcb |
Dawsh |
2y ago |
import { FC, PropsWithChildren } from "react"; |
| 2 |
4708fcb |
Dawsh |
2y ago |
import { |
| 3 |
4708fcb |
Dawsh |
2y ago |
ScrollArea, |
| 4 |
4708fcb |
Dawsh |
2y ago |
Sheet, |
| 5 |
4708fcb |
Dawsh |
2y ago |
SheetContent, |
| 6 |
4708fcb |
Dawsh |
2y ago |
SheetHeader, |
| 7 |
4708fcb |
Dawsh |
2y ago |
SheetTitle, |
| 8 |
4708fcb |
Dawsh |
2y ago |
} from "@marzneshin/components"; |
| 9 |
4708fcb |
Dawsh |
2y ago |
import { useTranslation } from "react-i18next"; |
| 10 |
4708fcb |
Dawsh |
2y ago |
|
| 11 |
4708fcb |
Dawsh |
2y ago |
export interface SettingsDialogProps { |
| 12 |
4708fcb |
Dawsh |
2y ago |
onOpenChange: (state: boolean) => void; |
| 13 |
4708fcb |
Dawsh |
2y ago |
open: boolean; |
| 14 |
4708fcb |
Dawsh |
2y ago |
} |
| 15 |
4708fcb |
Dawsh |
2y ago |
|
| 16 |
4708fcb |
Dawsh |
2y ago |
export const SettingsDialog: FC<SettingsDialogProps & PropsWithChildren> = ({ |
| 17 |
4708fcb |
Dawsh |
2y ago |
open, onOpenChange, children |
| 18 |
4708fcb |
Dawsh |
2y ago |
}) => { |
| 19 |
4708fcb |
Dawsh |
2y ago |
const { t } = useTranslation(); |
| 20 |
4708fcb |
Dawsh |
2y ago |
return ( |
| 21 |
4708fcb |
Dawsh |
2y ago |
<Sheet open={open} onOpenChange={onOpenChange}> |
| 22 |
4708fcb |
Dawsh |
2y ago |
<SheetContent className="sm:min-w-full md:min-w-[700px] space-y-5"> |
| 23 |
4708fcb |
Dawsh |
2y ago |
<SheetHeader > |
| 24 |
4708fcb |
Dawsh |
2y ago |
<SheetTitle>{t("settings")}</SheetTitle> |
| 25 |
4708fcb |
Dawsh |
2y ago |
</SheetHeader> |
| 26 |
4708fcb |
Dawsh |
2y ago |
<ScrollArea className="flex flex-col gap-4 h-full"> |
| 27 |
4708fcb |
Dawsh |
2y ago |
{children} |
| 28 |
4708fcb |
Dawsh |
2y ago |
</ScrollArea> |
| 29 |
4708fcb |
Dawsh |
2y ago |
</SheetContent> |
| 30 |
4708fcb |
Dawsh |
2y ago |
</Sheet> |
| 31 |
4708fcb |
Dawsh |
2y ago |
) |
| 32 |
4708fcb |
Dawsh |
2y ago |
} |