UI Bridge
VulnerabilitySelect
Controlled or uncontrolled field for the deal vulnerability, disabled when the mode hides it.
Import from @workspace/ui-bridge/fields/vulnerability-select.
VulnerabilitySelect
Lists engine.constants.VULNERABILITIES with the long labels of the Strings Provider (labels="short" for the short ones). Uncontrolled by default (DEFAULT_VULNERABILITY); disabled when the active mode hides the vulnerability field (engine.ctx.visibility). options restricts and orders the list.
For the single boolean a score needs, see VulnerableSelect.
import { VulnerabilitySelect } from '@workspace/ui-bridge/fields/vulnerability-select';
<VulnerabilitySelect value={vulnerability} onChange={setVulnerability} />
<VulnerabilitySelect labels="short" variant="toggle" value={vulnerability} onChange={setVulnerability} />Demo
Toggle
The same field with variant="toggle": every option inline, one pressed at a time.
Props
Prop
Type
Also accepts disabled and the context override of withBridgeContext.