Re-export everything from Icon, add IconComponentType (#65974)

This commit is contained in:
Maja
2026-04-22 16:55:19 +00:00
committed by GitHub
parent 9fc3824519
commit 88e883fd16
3 changed files with 13 additions and 3 deletions
+11 -1
View File
@@ -16,7 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import React, { ForwardedRef, forwardRef, PropsWithChildren } from 'react';
import React, {
ComponentType,
ForwardedRef,
forwardRef,
PropsWithChildren,
} from 'react';
import styled from 'styled-components';
import { borderRadius, color, space, SpaceProps } from 'design/system';
@@ -83,6 +88,11 @@ export type IconProps = SpaceProps & {
className?: string;
};
/**
* IconComponentType are used for vars and props that can hold an arbitrary icon.
*/
export type IconComponentType = ComponentType<IconProps>;
/**
* Props are used on the Icon component, but not in autogenerated icon components.
*/
+1 -1
View File
@@ -22,7 +22,7 @@ THIS FILE IS GENERATED. DO NOT EDIT.
*/
export { Icon } from './Icon';
export * from './Icon';
export { Add } from './Icons/Add';
export { AddCircle } from './Icons/AddCircle';
@@ -157,7 +157,7 @@ THIS FILE IS GENERATED. DO NOT EDIT.
*/
export { Icon } from './Icon';
export * from './Icon';
${lines.join('\n')}
`;