diff --git a/packages/codegen-ui-react/lib/__tests__/__snapshots__/studio-ui-codegen-react.test.ts.snap b/packages/codegen-ui-react/lib/__tests__/__snapshots__/studio-ui-codegen-react.test.ts.snap index edc8dd6d5..8daa8d58f 100644 --- a/packages/codegen-ui-react/lib/__tests__/__snapshots__/studio-ui-codegen-react.test.ts.snap +++ b/packages/codegen-ui-react/lib/__tests__/__snapshots__/studio-ui-codegen-react.test.ts.snap @@ -6422,23 +6422,28 @@ import { } from \\"@aws-amplify/ui-react/internal\\"; import { Icon, IconProps } from \\"@aws-amplify/ui-react\\"; -export type CustomIconProps = React.PropsWithChildren< +export type IconPrimitiveProps = React.PropsWithChildren< Partial & { overrides?: EscapeHatchProps | undefined | null; } >; -export default function CustomIcon(props: CustomIconProps): React.ReactElement { +export default function IconPrimitive( + props: IconPrimitiveProps +): React.ReactElement { const { overrides, ...rest } = props; return ( /* @ts-ignore: TS2322 */ ); } diff --git a/packages/codegen-ui/example-schemas/primitives/IconPrimitive.json b/packages/codegen-ui/example-schemas/primitives/IconPrimitive.json index 4cda95992..f55e80e3a 100644 --- a/packages/codegen-ui/example-schemas/primitives/IconPrimitive.json +++ b/packages/codegen-ui/example-schemas/primitives/IconPrimitive.json @@ -1,14 +1,18 @@ { "id": "1234-5678-9010", "componentType": "Icon", - "name": "CustomIcon", + "name": "IconPrimitive", "properties": { + "ariaLabel": { + "value": "Favorite" + }, + "viewBox": { + "type": "Object", + "value": "{\"width\": 24, \"height\": 24}" + }, "paths": { - "value": [ - { - "d": "M18 6V4h2V2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14v-2h-4.03c1.23-.91 2.03-2.36 2.03-4v-5H8v5c0 1.64.81 3.09 2.03 4H6V4h2v2c0 .55.45 1 1 1h8c.55 0 1-.45 1-1z" - } - ] + "type": "Object", + "value": "[{\"d\":\"M18 6V4h2V2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14v-2h-4.03c1.23-.91 2.03-2.36 2.03-4v-5H8v5c0 1.64.81 3.09 2.03 4H6V4h2v2c0 .55.45 1 1 1h8c.55 0 1-.45 1-1z\",\"fill\":\"black\"}]" } } } diff --git a/packages/test-generator/lib/components/primitives/IconPrimitive.json b/packages/test-generator/lib/components/primitives/IconPrimitive.json index 430fb9faa..f55e80e3a 100644 --- a/packages/test-generator/lib/components/primitives/IconPrimitive.json +++ b/packages/test-generator/lib/components/primitives/IconPrimitive.json @@ -10,8 +10,9 @@ "type": "Object", "value": "{\"width\": 24, \"height\": 24}" }, - "pathData": { - "value": "M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" + "paths": { + "type": "Object", + "value": "[{\"d\":\"M18 6V4h2V2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14v-2h-4.03c1.23-.91 2.03-2.36 2.03-4v-5H8v5c0 1.64.81 3.09 2.03 4H6V4h2v2c0 .55.45 1 1 1h8c.55 0 1-.45 1-1z\",\"fill\":\"black\"}]" } } }