import { h } from 'preact'; import PropTypes from 'prop-types'; import { Dropdown, Button } from '@crayons'; const Icon = () => ( ); /** * Component comprising a trigger button and dropdown with additional post options. * * @param {Object} props * @param {Object} props.passedData The current post options data * @param {Function} props.onSaveDraft Callback for when the post draft is saved * @param {Function} props.onConfigChange Callback for when the config options have changed */ export const Options = ({ passedData: { published = false, allSeries = [], canonicalUrl = '', series = '', }, onSaveDraft, onConfigChange, }) => { let publishedField = ''; let existingSeries = ''; if (allSeries.length > 0) { const seriesNames = allSeries.map((name, index) => { return ( ); }); existingSeries = (
Change meta tag
{` `}
canonical_url
{` `}
if this post was first published elsewhere (like your own blog).
Will this post be part of a series? Give the series a unique name. (Series visible once it has multiple posts)
{existingSeries}