/* @flow */
import React from 'react';
import Box from 'grommet/components/Box';
// import MarqueeForm from 'grommet-cms/components';
// $FlowFixMe
import { DashboardContentBlocks } from 'grommet-cms/containers';
// $FlowFixMe
import { PageHeader } from 'grommet-cms/components';

export default function PostListItemDetail(props: {
  item: {
    order: number,
    id: string,
    name: string,
    contentBlocks: Array<{}>
  }
}) {
  const { item } = props;
  return (
    <Box>
      <PageHeader title={`Edit ${item.name}`} />
      <DashboardContentBlocks contentBlocks={item.contentBlocks} />
    </Box>
  );
}

@@ -74,16 +74,206 @@
 s/Box';%0A
+import Section from 'grommet/components/Section';%0Aimport Footer from 'grommet/components/Footer';%0Aimport Menu from 'grommet/components/Menu';%0Aimport Button from 'grommet/components/Button';%0A
 // impor
@@ -615,176 +615,946 @@
 %0A  %7D
-%0A%7D) %7B%0A  const %7B item %7D = props;%0A  return (%0A    %3CBox%3E%0A      %3CPageHeader title=%7B%60Edit $%7Bitem.name%7D%60%7D /%3E%0A      %3CDashboardContentBlocks contentBlocks=%7Bitem.contentBlocks%7D /
+,%0A  onSubmit: Function,%0A  onCreateBlockClick: Function%0A%7D) %7B%0A  const %7B item, onSubmit, onCreateBlockClick %7D = props;%0A  return (%0A    %3CBox%3E%0A      %3CPageHeader title=%7B%60Edit $%7Bitem.name%7D%60%7D /%3E%0A      %3CSection pad=%22medium%22%3E%0A        %3CBox pad=%22small%22%3E%0A          %3CDashboardContentBlocks blocks=%7Bitem.contentBlocks%7D /%3E%0A          %3CFooter align=%22center%22 justify=%22center%22 pad=%22large%22%3E%0A            %3CMenu%0A              className=%22dashboard--content-blocks__button-footer%22%0A              direction=%22row%22%0A              inline%0A              responsive=%7Bfalse%7D%0A            %3E%0A              %3CButton%0A                label=%22submit%22%0A                onClick=%7BonSubmit%7D%0A                primary=%7Btrue%7D%0A                type=%22submit%22%0A              /%3E%0A              %3CButton%0A                label=%22add block%22%0A                onClick=%7BonCreateBlockClick%7D%0A                primary=%7Bfalse%7D%0A              /%3E%0A            %3C/Menu%3E%0A          %3C/Footer%3E%0A        %3C/Box%3E%0A      %3C/Section
 %3E%0A  

refactor the post list item detail with old content block section