docbrown/app/javascript/article-form/elements/orgSettings.jsx
Ben Halpern ecb9645775
Make changes to editor (#837)
* Make changes to editor

* Make minor fixes and console log removals

* Fix test in article form

* Adjust rspec test
2018-10-05 16:03:06 -04:00

19 lines
575 B
JavaScript

import { h } from 'preact';
import PropTypes from 'prop-types';
const OrgSettings = ({ organization, postUnderOrg, onToggle }) => (
<div
className='articleform__orgsettings'
style={{backgroundColor: organization.bg_color_hex, color: organization.text_color_hex}}
onClick={onToggle}
>
Post From {organization.name} <button class={postUnderOrg ? 'yes' : 'no'}>{postUnderOrg ? 'YES' : 'NO'}</button>
</div>
);
OrgSettings.propTypes = {
onChange: PropTypes.func.isRequired,
defaultValue: PropTypes.string.isRequired,
};
export default OrgSettings;