The problem
Users are often using reusable components to render Tags with different colors (type) based on some status.
To achieve this, a TagType enum needs to be defined because we can not import it from carbon/react.
For instance:
enum TagType {
red = 'red'
green....
...
}
interface CustomInterface {
type: TagType,
title: string,
}
The solution
Could be nice to define and export a TagType containing all supported types and then import it so that we can use it in our interfaces, couple of examples below.
Examples
Example of an interface for Props, with tagType
import {TagType} from '@carbon/react';
interface CustomInterface {
tagType: TagType,
title: string,
}
`<MyCustomCardWithTag tagType={TagType.red} title="Example" />`
Application/PAL
No response
Business priority
Low Priority = release date is not dependent on fix or not upcoming
Available extra resources
I'm happy to contribute if this change can be useful.
Code of Conduct
The problem
Users are often using reusable components to render Tags with different colors (type) based on some status.
To achieve this, a TagType enum needs to be defined because we can not import it from carbon/react.
For instance:
The solution
Could be nice to define and export a
TagTypecontaining all supported types and then import it so that we can use it in our interfaces, couple of examples below.Examples
Example of an interface for Props, with tagType
Application/PAL
No response
Business priority
Low Priority = release date is not dependent on fix or not upcoming
Available extra resources
I'm happy to contribute if this change can be useful.
Code of Conduct