key={currentStageConfig.instructionStep}
timeout={250}
mountOnEnter
unmountOnExit
+ onExiting={(n: HTMLElement) => {
+ n.style.transform = `translateX(${
+ transitionRef.current === 'prev' ? '50px' : '-50px'
+ })`;
+ }}
>
{state => (
{currentStageConfig.instructionStep ===
InstructionStep.First && (
{
- setStage(Stage.NewProviderFullScreen);
- }}
+ onNext={() => updateState(Stage.NewProviderFullScreen)}
+ onPrev={null}
clusterPublicUri={clusterPublicUri}
/>
)}
{currentStageConfig.instructionStep ===
InstructionStep.Second && (
{
- setStage(Stage.AddProvider);
+ awsOidc={awsOidc}
+ onNext={updatedAwsOidc => {
+ updateState(Stage.AddProvider, updatedAwsOidc);
+ }}
+ onPrev={updatedAwsOidc => {
+ updateState(Stage.Initial, updatedAwsOidc);
}}
clusterPublicUri={clusterPublicUri}
/>
@@ -189,41 +232,44 @@ export function AwsOidc() {
{currentStageConfig.instructionStep ===
InstructionStep.Third && (
{
- setStage(Stage.CreateNewRole);
- }}
+ onNext={() => updateState(Stage.CreateNewRole)}
+ onPrev={() => updateState(Stage.NewProviderFullScreen)}
clusterPublicUri={clusterPublicUri}
/>
)}
{currentStageConfig.instructionStep ===
InstructionStep.Fourth && (
{
- setStage(Stage.CreatePolicy);
- }}
+ onNext={() => updateState(Stage.CreatePolicy)}
+ onPrev={() => updateState(Stage.AddProvider)}
clusterPublicUri={clusterPublicUri}
/>
)}
{currentStageConfig.instructionStep ===
InstructionStep.Fifth && (
{
- setStage(Stage.AssignPolicyToRole);
- }}
+ onNext={() => updateState(Stage.AssignPolicyToRole)}
+ onPrev={() => updateState(Stage.CreateNewRole)}
clusterPublicUri={clusterPublicUri}
/>
)}
{currentStageConfig.instructionStep ===
InstructionStep.Sixth && (
{
- setStage(Stage.ListRoles);
- }}
+ onNext={() => updateState(Stage.ListRoles)}
+ onPrev={() => updateState(Stage.CreatePolicy)}
clusterPublicUri={clusterPublicUri}
/>
)}
{currentStageConfig.instructionStep ===
- InstructionStep.Seventh && }
+ InstructionStep.Seventh && (
+
+ updateState(Stage.AssignPolicyToRole, updatedAwsOidc)
+ }
+ />
+ )}
)}
diff --git a/web/packages/teleport/src/Integrations/Enroll/AwsOidc/IAM/SharedComponents.tsx b/web/packages/teleport/src/Integrations/Enroll/AwsOidc/IAM/SharedComponents.tsx
index 14551a14145ce..d2bc586ea08a9 100644
--- a/web/packages/teleport/src/Integrations/Enroll/AwsOidc/IAM/SharedComponents.tsx
+++ b/web/packages/teleport/src/Integrations/Enroll/AwsOidc/IAM/SharedComponents.tsx
@@ -15,7 +15,7 @@
*/
import React from 'react';
-import styled from 'styled-components';
+import styled, { useTheme } from 'styled-components';
import { AWSIcon, ChevronRightIcon } from 'design/SVGIcon';
@@ -59,12 +59,13 @@ export function BreadcrumbArrow() {
export function AWSWrapper(props: React.PropsWithChildren