* 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
34 lines
1 KiB
JavaScript
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';
|