mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-04 13:08:33 +01:00
24 lines
552 B
TypeScript
24 lines
552 B
TypeScript
import type React from "react";
|
|
import { Switch } from "react-native";
|
|
import { ListItem } from "@/components/list/ListItem";
|
|
|
|
interface Props {
|
|
title: string;
|
|
subtitle?: string;
|
|
value: boolean;
|
|
onValueChange: (value: boolean) => void;
|
|
disabled?: boolean;
|
|
}
|
|
|
|
export const SettingsSwitchRow: React.FC<Props> = ({
|
|
title,
|
|
subtitle,
|
|
value,
|
|
onValueChange,
|
|
disabled,
|
|
}) => (
|
|
<ListItem title={title} subtitle={subtitle} disabled={disabled}>
|
|
<Switch value={value} disabled={disabled} onValueChange={onValueChange} />
|
|
</ListItem>
|
|
);
|