Skip to content

CreateIncidentDrawer

Store ops workflows that file incidents from Whisker modules. Pairs with IncidentsWidget for read + create flows.

Generic forms — build with Podium inputs. Non-incident ticketing — this is ServiceNow-specific.

  • Podium TextField
  • Podium Select
  • Podium Button
  • Podium Drawer
  • NikeStoreProvider
  • SlideOutProvider

Auto-generated from src/components/CreateIncidentDrawer/CreateIncidentDrawer.types.ts. Do not edit by hand. Run pnpm docs:props after changing source JSDoc.

Prop Type Required Description
accessToken null | string Yes SIM user JWT (Okta or Retail) used as Authorization: Bearer <token> on every BFF call. When null, all incident requests will fail with a 401 — the host should keep this in sync with its auth store.
allowScreenCapture boolean No When true, renders a ScreenCaptureUpload field in the form so users can attach a screenshot or PDF to the incident report. Default: false
apiConfig IncidentApiConfig Yes BFF endpoint configuration
disabled boolean No Disables the trigger button.
onClose () => void No Controlled mode: called when the drawer requests to close. Required when open is provided.
onError (error: Error) => void No Called when any API error occurs during form load or submission.
onScreenshotChange (file: File | null) => void No Called whenever the selected screenshot file changes (or is cleared). Useful if the parent needs to handle the upload separately.
onSuccess (incidentNumber: string) => void No Called with the incident number string when the incident is successfully created. Use this to show a toast, redirect, or refresh data.
open boolean No Controlled mode: when provided, the drawer open state is controlled externally and the built-in trigger button is hidden.
services IncidentServices No Injectable service overrides. Pass mock implementations for Storybook stories and tests; omit to use the real BFF proxy.
triggerLabel string No Label for the button that opens the drawer. Default: 'Create Incident'
import { CreateIncidentDrawer } from '@nike/whisker-component-library';
<CreateIncidentDrawer
open={open}
onOpenChange={setOpen}
accessToken={token}
apiConfig={{ baseUrl: '/sim-bff/incidents' }}
onCreated={(result) => console.log(result.incidentNumber)}
/>;