docbrown/app/javascript/chat/ChatChannelSettings/PersonalSetting.jsx
Katie Davis 76453b41fb
Updates ESLint rules to error on default imports (#12512)
* add rule

* add named imports

* more missed files

* so many files
2021-02-02 10:24:03 -05:00

42 lines
1.2 KiB
JavaScript

import { h } from 'preact';
import PropTypes from 'prop-types';
import { Button } from '@crayons';
export const PersonalSettings = ({
handlePersonChannelSetting,
showGlobalBadgeNotification,
updateCurrentMembershipNotificationSettings,
}) => {
return (
<div className="crayons-card p-4 grid gap-2 mb-4 personl-settings">
<h3>Personal Settings</h3>
<h4>Notifications</h4>
<div className="crayons-field crayons-field--checkbox">
<input
type="checkbox"
id="c3"
className="crayons-checkbox"
checked={showGlobalBadgeNotification}
onChange={handlePersonChannelSetting}
/>
<label htmlFor="c3" className="crayons-field__label">
Receive Notifications for New Messages
</label>
</div>
<div>
<Button
type="submit"
onClick={updateCurrentMembershipNotificationSettings}
>
Submit
</Button>
</div>
</div>
);
};
PersonalSettings.propTypes = {
updateCurrentMembershipNotificationSettings: PropTypes.func.isRequired,
showGlobalBadgeNotification: PropTypes.bool.isRequired,
handlePersonChannelSetting: PropTypes.func.isRequired,
};