StepperList: Type fix for STATUSES export #3207
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
π Summary
If merged, this PR would update the type of the
STATUSES
export in the StepperList::Step to fix linting issues.π οΈ Detailed description
Originally this PR was to update an incorrect import path in the showcase pages of the StepperList. Upon fixing this path, however a new linting error was thrown in the showcase.
Upon further investigation, this linting error is due to the type of the
STATUES
export of the StepperList. The type ofSTATUSES
is set tostring[]
, but the@status
argument of the component is typed as the component specific typeHdsStepperStatuses
. When usingSTATUSES
in the showcase examples this then causes a type mismatch.To fix this issue, the type of the export
STATUSES
was updated fromstring[]
toHdsStepperStatuses[]
Potential follow-ups
In the component library, the majority of exported arrays of possible values for an argument are typed as the custom type for that component. However, there are various exports that follow this same pattern of typing the export as
string[]
. These exports will most likely run into the same type issues as those found here.An effort could be taken to update these types to follow the changes made here.
Example from the Separator component
π Component checklist
π¬ Please consider using conventional comments when reviewing this PR.
π PCI review checklist
Examples of changes to controls include access controls, encryption, logging, etc.
Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.