Web: Add outline-info Alert.tsx + move navigation code for general use#36554
Web: Add outline-info Alert.tsx + move navigation code for general use#36554
Conversation
|
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
1 similar comment
|
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
| * For simple views, defining indexes is not required. | ||
| * | ||
| * | ||
| * Example of how nesting views are used for Discover wizards: |
There was a problem hiding this comment.
You can use @example tag https://jsdoc.app/tags-example
| ); | ||
| } | ||
|
|
||
| const index = props.view.index != null ? props.view.index : props.index; |
There was a problem hiding this comment.
| const index = props.view.index != null ? props.view.index : props.index; | |
| const index = props.view.index ?? props.index; |
| export function findViewAtIndex<T>( | ||
| views: BaseView<T>[], | ||
| currentStep: number | ||
| ): BaseView<T> | null { |
There was a problem hiding this comment.
Nit: I don't think this function returns null, it rather should be undefined.
| views={indexedViews} | ||
| selectedResource={agentProps.resourceSpec} | ||
| /> | ||
| <Box mt="10px" mb="45px"> |
There was a problem hiding this comment.
Do you think we could use theme values?
| return { | ||
| background: fade(theme.colors.link, 0.1), | ||
| border: `${theme.radii[1]}px solid ${theme.colors.link}`, | ||
| borderRadius: `${theme.radii[3]}px`, |
There was a problem hiding this comment.
Having a different border radius here is on purpose?
There was a problem hiding this comment.
yes, the latest design called for it: https://www.figma.com/file/uLevdNsEnIvvLDSZ9sQqXM/Discover-Access?type=design&node-id=1963-9188&mode=design&t=9oBHExTE75bk4kJA-0
- basically moves code out of Discovery for general use elsewhere - refactor + test
a4bf5a3 to
cbb627d
Compare
#36554) * Add alert outline-info * Add nesting to shared Navigation component - basically moves code out of Discovery for general use elsewhere - refactor + test * Change imports * Address CRs
#36554) * Add alert outline-info * Add nesting to shared Navigation component - basically moves code out of Discovery for general use elsewhere - refactor + test * Change imports * Address CRs
part of https://github.com/gravitational/teleport.e/issues/2998