-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Align the preparation wizard page with what is defined in the mock-ups. Signed-off-by: Alejandro Visiedo <[email protected]>
- Loading branch information
Showing
5 changed files
with
268 additions
and
122 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 |
---|---|---|
@@ -1,20 +1,50 @@ | ||
import { createContext } from 'react'; | ||
import { Domain } from './Api'; | ||
|
||
/** | ||
* It represents the application context so common events and properties | ||
* are shared for many components, making their values accessible. | ||
* @public | ||
*/ | ||
export interface IAppContext { | ||
/** Represent the current list of domains to be displayed in the listDomains view. */ | ||
domains: Domain[]; | ||
/** Callback to set the value of `domains`. */ | ||
setDomains: (domains: Domain[]) => void; | ||
// wizardDomain?: Domain; | ||
// setWizardDomain: (domain?: Domain) => void; | ||
/** Encapsulates the context related with the wizard. */ | ||
wizard: { | ||
/** Retrieve the current token, required to register a domain. */ | ||
getToken: () => string; | ||
/** Set the value of the token. */ | ||
setToken: (value: string) => void; | ||
/** Get the ephemeral domain state that manage the wizard. */ | ||
getDomain: () => Domain; | ||
/** Set the ephemeral domain information. */ | ||
setDomain: (value: Domain) => void; | ||
}; | ||
} | ||
|
||
/** | ||
* Represent the application context. | ||
* @public | ||
*/ | ||
export const AppContext = createContext<IAppContext>({ | ||
domains: [], | ||
setDomains: (domains: Domain[]) => { | ||
throw new Error('Function "setDomains" not implemented: domains=' + domains); | ||
}, | ||
// wizardDomain: undefined, | ||
// setWizardDomain: (domain?: Domain) => { | ||
// throw new Error('Function "setWizardDomain" not implemented: domain=' + domain); | ||
// }, | ||
wizard: { | ||
getToken: (): string => { | ||
return ''; | ||
}, | ||
setToken: (value: string) => { | ||
throw new Error('Function "setToken" not implemented: value=' + value); | ||
}, | ||
getDomain: (): Domain => { | ||
return {} as Domain; | ||
}, | ||
setDomain: (value: Domain) => { | ||
throw new Error('Function "setDomain" not implemented: value=' + value); | ||
}, | ||
}, | ||
}); |
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
8 changes: 0 additions & 8 deletions
8
src/Routes/WizardPage/Components/PagePreparation/PagePreparation.scss
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 |
---|---|---|
@@ -1,9 +1 @@ | ||
@import '~@redhat-cloud-services/frontend-components-utilities/styles/variables'; | ||
|
||
.domain-type-select { | ||
width: 50%; | ||
} | ||
|
||
.domain-item-margin-left { | ||
margin-left: 16px; | ||
} |
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
Oops, something went wrong.