This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
outline/app/scenes/Settings/components/NotificationListItem.js
Tom Moor e2bd03494d
chore: Update syntax, improve more typing (#1439)
* chore: <React.Fragment> to <>

* flow types
2020-08-09 09:48:04 -07:00

36 lines
678 B
JavaScript

// @flow
import * as React from "react";
import NotificationSetting from "models/NotificationSetting";
import Checkbox from "components/Checkbox";
type Props = {
setting?: NotificationSetting,
title: string,
event: string,
description: string,
disabled: boolean,
onChange: (ev: SyntheticInputEvent<>) => void | Promise<void>,
};
const NotificationListItem = ({
setting,
title,
event,
onChange,
disabled,
description,
}: Props) => {
return (
<Checkbox
label={title}
name={event}
checked={!!setting}
onChange={onChange}
note={description}
disabled={disabled}
/>
);
};
export default NotificationListItem;