import React from 'react' import { __ } from '@wordpress/i18n' import { Button } from '../Button' export interface DemoPageHeaderProps { title: string description: string /** Whether the walkthrough has left its idle state. */ hasStarted: boolean isFinished: boolean onPlay: VoidFunction onSkip: VoidFunction onReplay: VoidFunction } /** * Page header shared by the feature walkthroughs: the screen title, a chip * marking the page as a demo, and the playback controls for whichever stage * the walkthrough is currently in. */ export const DemoPageHeader: React.FC = ({ title, description, hasStarted, isFinished, onPlay, onSkip, onReplay }) => <>

{title} {__('Demo', 'code-snippets')}

{!hasStarted && } {hasStarted && !isFinished && } {isFinished && }

{description}