1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: small UI fixes to the clone environment modal (#2290)

fix: small UI fixes to the environment modal
This commit is contained in:
Nuno Góis 2022-10-28 16:05:27 +01:00 committed by GitHub
parent 7e03fba6cd
commit 09cb61c719
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -320,7 +320,7 @@ export const EnvironmentCloneModal = ({
<FormControlLabel
value={APITokenGeneration.LATER}
control={<Radio />}
label="Generate an API token later"
label="I want to generate an API token later"
/>
<FormControlLabel
value={APITokenGeneration.NOW}
@ -329,35 +329,39 @@ export const EnvironmentCloneModal = ({
/>
</RadioGroup>
</FormControl>
<ConditionallyRender
condition={
apiTokenGeneration ===
APITokenGeneration.NOW
}
show={
<StyledInlineContainer>
<StyledInputSecondaryDescription>
A new Server-side SDK (CLIENT) API
token will be generated for the
cloned environment, so you can get
started right away.
</StyledInputSecondaryDescription>
<StyledInputDescription>
Which projects do you want this
token to give access to?
</StyledInputDescription>
<SelectProjectInput
options={selectableProjects}
defaultValue={tokenProjects}
onChange={setTokenProjects}
error={errors.projects}
onFocus={() =>
clearError(ErrorField.PROJECTS)
}
/>
</StyledInlineContainer>
}
/>
<StyledInlineContainer>
<StyledInputSecondaryDescription>
A new Server-side SDK (CLIENT) API token
will be generated for the cloned
environment, so you can get started right
away.
</StyledInputSecondaryDescription>
<ConditionallyRender
condition={
apiTokenGeneration ===
APITokenGeneration.NOW
}
show={
<>
<StyledInputDescription>
Which projects do you want this
token to give access to?
</StyledInputDescription>
<SelectProjectInput
options={selectableProjects}
defaultValue={tokenProjects}
onChange={setTokenProjects}
error={errors.projects}
onFocus={() =>
clearError(
ErrorField.PROJECTS
)
}
/>
</>
}
/>
</StyledInlineContainer>
</StyledSecondaryContainer>
</div>