Skip to content

Commit e12b757

Browse files
fix(demo): use public GetProps type in Avatar demo (#59328)
The demo imported AvatarGroupProps from '../AvatarGroup'. AGENTS.md forbids relative imports in demos, demo source is shown on the site for copy-paste, and the type it reached for is marked deprecated in favour of GetProps<typeof Avatar.Group>.
1 parent 91a6d1d commit e12b757

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎components/avatar/demo/max-count.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import React, { useState } from 'react';
22
import { toArray } from '@rc-component/util';
33
import { Avatar, Flex, InputNumber, Switch } from 'antd';
4-
import type { AvatarGroupProps } from '../AvatarGroup';
4+
import type { GetProps } from 'antd';
5+
6+
type AvatarGroupProps = GetProps<typeof Avatar.Group>;
57

68
const AvatarGroupOverflow: React.FC<AvatarGroupProps & { overflowInFinal?: boolean }> = (props) => {
79
const { overflowInFinal, ...restProps } = props;

0 commit comments

Comments
 (0)