@patternfly/react-core APIs
- Button
- Title
- Spinner
- EmptyState
- EmptyStateIcon
- EmptyStateBody
- Stack
- StackItem
- TextInput
- Bullseye
- Modal
- FormGroup
- Card
- CardBody
- Flex
- Text
- Form
- Split
- SplitItem
- Tooltip
- PageSection
- FlexItem
- Grid
- GridItem
- Pagination
- Dropdown
- DropdownItem
- Label
- Page
- TextContent
- TextVariants
- Checkbox
- InputGroup
- DropdownToggle
- Popover
- Breadcrumb
- BreadcrumbItem
- Tabs
- Tab
- TabTitleText
- Alert
- Toolbar
- CardTitle
- KebabToggle
- DataList
- DataListCell
- DataListItem
- DataListItemCells
- DataListItemRow
- TextArea
- ActionGroup
- PageSectionVariants
- FormSelect
- FormSelectOption
- ToolbarItem
- ToolbarContent
- Select
- SelectOption
- ChipGroup
- Chip
- DropdownPosition
- CardFooter
- EmptyStateSecondaryActions
- PaginationVariant
- ModalVariant
- AlertGroup
- Switch
- CardHeader
- DatePicker
- Wizard
- DropdownToggleCheckbox
- ExpandableSection
- LabelGroup
- TextListItem
- TextList
- Skeleton
- ClipboardCopy
- ToggleGroup
- ToggleGroupItem
- AlertActionCloseButton
- AlertActionLink
- AlertVariant
- Badge
- Radio
- Nav
- NavList
- ValidatedOptions
- Brand
- PageHeader
- PageHeaderTools
- PageHeaderToolsItem
- PageSidebar
- WizardContextConsumer
- EmptyStatePrimary
- BreadcrumbHeading
- TextListVariants
- TextListItemVariants
- Backdrop
- HelperText
- HelperTextItem
- Gallery
- GalleryItem
- ModalBoxFooter
- DualListSelector
- DualListSelectorPane
- DualListSelectorList
- DualListSelectorListItem
- DualListSelectorControlsWrapper
- DualListSelectorControl
- InputGroupText
- Divider
- SearchInput
- PopoverPosition
- FormHelperText
- EmptyStateVariant
- DescriptionList
- DescriptionListGroup
- DescriptionListTerm
- DescriptionListDescription
- TooltipPosition
- SelectVariant
- AboutModal
- PageHeaderToolsGroup
- TabTitleIcon
- DropdownDirection
- FormAlert
- LoginMainFooterBandItem
- LoginPage
- LoginMainFooterLinksItem
- DataListAction
- CardActions
- NavItem
- ApplicationLauncher
- ApplicationLauncherItem
- ApplicationLauncherGroup
- NavExpandable
OtherRelated APIs
- react-redux#useDispatch
- @patternfly/react-core#Button
- @patternfly/react-core#TextInput
- @patternfly/react-core#EmptyState
- @patternfly/react-core#EmptyStateIcon
- @patternfly/react-core#EmptyStateBody
- @patternfly/react-core#Title
- @patternfly/react-core#Modal
- @patternfly/react-core#Spinner
- @patternfly/react-core#Form
- @patternfly/react-core#FormGroup
- @patternfly/react-core#Split
- @patternfly/react-core#SplitItem
- @patternfly/react-core#Popover
- @patternfly/react-core#DatePicker
- @patternfly/react-core#Wizard
@patternfly/react-core#WizardContextConsumer JavaScript Examples
The following examples show how to use
@patternfly/react-core#WizardContextConsumer.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EditRequestModal.js From access-requests-frontend with Apache License 2.0 | 4 votes |
ReviewStep = ({
targetAccount,
start,
end,
roles,
isLoading,
error,
onClose,
}) => {
let content = null;
if (isLoading) {
content = (
<EmptyState>
<EmptyStateIcon icon={() => <Spinner size="lg" />} />
<Title headingLevel="h2" size="lg">
Submitting access request
</Title>
<Button variant="link" onClick={onClose}>
Close
</Button>
</EmptyState>
);
} else if (error) {
const context = React.useContext(WizardContextConsumer);
content = (
<EmptyState>
<EmptyStateIcon icon={ExclamationCircleIcon} color="#C9190B" />
<Title headingLevel="h2" size="lg">
{error.title}
</Title>
<EmptyStateBody>{error.description}</EmptyStateBody>
{error.title === invalidAccountTitle && (
<Button variant="primary" onClick={() => context.goToStepById(1)}>
Return to Step 1
</Button>
)}
</EmptyState>
);
} else {
content = (
<React.Fragment>
<Title headingLevel="h2" style={spaceUnderStyle}>
Review details
</Title>
<table>
<tr>
<td style={spaceUnderStyle}>
<b>Account number</b>
</td>
<td style={spaceUnderStyle}>{targetAccount}</td>
</tr>
<tr>
<td style={{ paddingRight: '32px' }}>
<b>Access duration</b>
</td>
<td></td>
</tr>
<tr>
<td>From</td>
<td>{start}</td>
</tr>
<tr>
<td style={spaceUnderStyle}>To</td>
<td style={spaceUnderStyle}>{end}</td>
</tr>
<tr>
<td>
<b>Roles</b>
</td>
<td>{roles[0]}</td>
</tr>
{roles.slice(1).map((role) => (
<tr key={role}>
<td></td>
<td>{role}</td>
</tr>
))}
</table>
</React.Fragment>
);
}
return <React.Fragment>{content}</React.Fragment>;
}