Closed MI6-451 closed 1 month ago
Depending on when this is done, it may be possible to allow an array and string with '/'. There is a split which converts the string to an array (https://github.com/mi6/ic-ui-kit/blob/main/packages/web-components/src/components/ic-loading-indicator/ic-loading-indicator.tsx#L202), so there can be a check on the data type of label. If returns array/object, skip the split and use the rest of the method.
Do on the v3 branch when we work on it
Summary
Allow the loading indicator to allow arrays of strings as prop inputs as opposed to a single string with values separated by '/'
💬 Description
Currently, when a developer wants to have multiple text values appear and switch periodically below a loading indicator component (e.g. loading -> still loading -> loading) this must be input as a single string with values separated by '/' e.g. "loading/still loading" We should instead allow developers to input an array of strings e.g. ["loading", "still loading"]
💰 Use value
This change will hopefully make the developer experience when using this component smoother as it is more in line with standard practice and what most developers would expect.
Additional info
This will introduce a breaking change as any loading indicators currently implemented with multiple text values will need to be updated to use arrays rather than '/' separated values.