lbry-desktop/ui/component/settingClosingBehavior/view.jsx

31 lines
727 B
React
Raw Permalink Normal View History

2020-08-13 18:57:00 +02:00
// @flow
import React from 'react';
import { FormField } from 'component/common/form';
type Props = {
toTrayWhenClosed: boolean,
setToTrayWhenClosed: (boolean) => void,
noLabels?: boolean,
2020-08-13 18:57:00 +02:00
};
function SettingClosingBehavior(props: Props) {
const { toTrayWhenClosed, setToTrayWhenClosed, noLabels } = props;
2020-08-13 18:57:00 +02:00
return (
<React.Fragment>
<FormField
type="checkbox"
name="totraywhenclosed"
onChange={(e) => {
2020-08-13 18:57:00 +02:00
setToTrayWhenClosed(e.target.checked);
}}
checked={toTrayWhenClosed}
label={noLabels ? '' : __('Leave app running in notification area when the window is closed')}
2020-08-13 18:57:00 +02:00
/>
</React.Fragment>
);
}
export default SettingClosingBehavior;