import React , { ComponentProps , useState } from 'react' ; import type { AlertWorkflowStatus } from '../../../../../common/typings' ; import { WorkflowStatusFilter } from './workflow_status_filter' ; type Args = ComponentProps < typeof WorkflowStatusFilter > ; export default { title : 'app/Alerts/StatusFilter' , component : WorkflowStatusFilter , argTypes : { onChange : { action : 'change' } , } , } ; export function Example ( { onChange } ) { const [ status , setStatus ] = useState < AlertWorkflowStatus > ( 'open' ) ; return ( < WorkflowStatusFilter status = { status } onChange = { ( value ) => { setStatus ( value ) ; onChange ( value ) ; } } />); }