frontend-plugin-api: IconElement
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -14,4 +14,4 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export type { IconComponent } from './types';
|
||||
export type { IconComponent, IconElement } from './types';
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ComponentType } from 'react';
|
||||
import { ComponentType, JSX } from 'react';
|
||||
|
||||
/**
|
||||
* IconComponent is the common icon type used throughout Backstage when
|
||||
@@ -31,7 +31,15 @@ import { ComponentType } from 'react';
|
||||
* also describe your use-case and reasoning of the addition.
|
||||
*
|
||||
* @public
|
||||
* @deprecated Use {@link IconElement} instead, passing `<MyIcon />` rather than `MyIcon`.
|
||||
*/
|
||||
export type IconComponent = ComponentType<{
|
||||
fontSize?: 'medium' | 'large' | 'small' | 'inherit';
|
||||
}>;
|
||||
|
||||
/**
|
||||
* The type used for icon elements throughout Backstage.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type IconElement = JSX.Element | null;
|
||||
|
||||
Reference in New Issue
Block a user