-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from varghvi/main
merging latest
- Loading branch information
Showing
9 changed files
with
156 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
import React, { useState } from 'react'; | ||
import { AppLayout, Box, Button, ColumnLayout, Container, Header, SpaceBetween, Table, Wizard } from '~components'; | ||
import { columnsConfig } from '../table/shared-configs'; | ||
import { generateItems, Instance } from '../table/generate-data'; | ||
import labels from './utils/labels'; | ||
|
||
import ScreenshotArea from '../utils/screenshot-area'; | ||
|
||
const items = generateItems(20); | ||
|
||
export default function () { | ||
const [activeStepIndex, setActiveStepIndex] = useState(0); | ||
|
||
return ( | ||
<ScreenshotArea gutters={false}> | ||
<AppLayout | ||
ariaLabels={labels} | ||
navigationHide={false} | ||
content={ | ||
<Wizard | ||
i18nStrings={{ | ||
stepNumberLabel: stepNumber => `Step ${stepNumber}`, | ||
collapsedStepsLabel: (stepNumber, stepsCount) => `Step ${stepNumber} of ${stepsCount}`, | ||
skipToButtonLabel: step => `Skip to ${step.title}`, | ||
navigationAriaLabel: 'Steps', | ||
cancelButton: 'Cancel', | ||
previousButton: 'Previous', | ||
nextButton: 'Next', | ||
submitButton: 'Launch instance', | ||
optional: 'optional', | ||
}} | ||
onNavigate={({ detail }) => setActiveStepIndex(detail.requestedStepIndex)} | ||
activeStepIndex={activeStepIndex} | ||
allowSkipTo={true} | ||
steps={[ | ||
{ | ||
title: 'Add storage', | ||
content: ( | ||
<Box> | ||
<Table<Instance> | ||
header={ | ||
<Header | ||
variant="awsui-h1-sticky" | ||
description="Demo page with footer" | ||
actions={<Button variant="primary">Create</Button>} | ||
> | ||
Sticky Scrollbar Example | ||
</Header> | ||
} | ||
columnDefinitions={columnsConfig} | ||
items={items} | ||
/> | ||
</Box> | ||
), | ||
isOptional: true, | ||
}, | ||
{ | ||
title: 'Review and launch', | ||
content: ( | ||
<SpaceBetween size="xs"> | ||
<Header variant="h3" actions={<Button onClick={() => setActiveStepIndex(0)}>Edit</Button>}> | ||
Step 1: Instance type | ||
</Header> | ||
<Container header={<Header variant="h2">Container title</Header>}> | ||
<ColumnLayout columns={2} variant="text-grid"> | ||
<div> | ||
<Box variant="awsui-key-label">First field</Box> | ||
<div>Value</div> | ||
</div> | ||
<div> | ||
<Box variant="awsui-key-label">Second Field</Box> | ||
<div>Value</div> | ||
</div> | ||
</ColumnLayout> | ||
</Container> | ||
</SpaceBetween> | ||
), | ||
}, | ||
]} | ||
/> | ||
} | ||
contentType="wizard" | ||
/> | ||
</ScreenshotArea> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,7 @@ | |
height: 200px; | ||
overflow: scroll; | ||
} | ||
|
||
.content-item { | ||
height: 100px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters