import React from 'react'
import { Story, Meta } from '@storybook/react'
import { Page, PageProps } from './Page'

export default {
  title: 'Structure/Page',
  component: Page,
  argTypes: {
    title: {
      name: 'title',
      description: 'Page title',
      type: { name: 'string', required: false }
    },
    upward: {
      name: 'upward',
      description: 'Upward one level navigation'
    }
  }
} as Meta

const Template: Story<PageProps> = (args: any) => <Page {...args}></Page>

export const Default = Template.bind({})
Default.args = {
  title: 'Page Title'
}

export const WithUpward = Template.bind({})
WithUpward.args = {
  title: 'With upward',
  upward: { onAction: () => alert('Upward') }
}