docbrown/app/javascript/article-form/components/PageTitle.jsx
ludwiczakpawel 39295c0bea
Layout updates (#8107)
* flare tag line height

* .

* init

* widgets

* widgets lists

* new tabs on home

* instantclick

* .

* rethinking css

* .

* .

* empty space

* campaign widget

* .

* merge

* .

* update layout

* fix sidebars on home page

* .

* fix onboarding x

* spec

* test

* test

* better handling ads

* .

* spec

* card styling

* .

* i dont know what have i broken
2020-06-04 16:12:17 +02:00

34 lines
1 KiB
JavaScript

import { h } from 'preact';
import PropTypes from 'prop-types';
import { OrganizationPicker } from '../../organization/OrganizationPicker';
export const PageTitle = ({organizations, organizationId, onToggle}) => {
return (
<div className="crayons-field__label flex items-center flex-1">
<span className="hidden s:inline-block mr-2 whitespace-nowrap">
Write a new post
</span>
{organizations && organizations.length > 0 && (
<div>
<OrganizationPicker
name="article[organization_id]"
id="article_publish_under_org"
className="crayons-select mt-0"
organizations={organizations}
organizationId={organizationId}
onToggle={onToggle}
emptyLabel="Personal"
/>
</div>
)}
</div>
);
};
PageTitle.propTypes = {
organizations: PropTypes.string.isRequired,
organizationId: PropTypes.string.isRequired,
onToggle: PropTypes.string.isRequired,
};
PageTitle.displayName = 'Organization';