Skip to content

Commit 79be47e

Browse files
arvinxxjcdiv47
andauthored
🐛 fix: fix Groq Combine (#15)
* Create Combine.tsx (#14) * 📝 docs: update groq * 🐛 fix: fix type * 💄 style: update style --------- Co-authored-by: Jiaqi Cai <[email protected]>
1 parent 035232a commit 79be47e

File tree

3 files changed

+40
-2
lines changed

3 files changed

+40
-2
lines changed

src/Groq/components/Combine.tsx

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { memo } from 'react';
2+
3+
import IconCombine, { type IconCombineProps } from '@/IconCombine';
4+
5+
import { SPACE_MULTIPLE, TEXT_MULTIPLE, TITLE } from '../style';
6+
import Avatar from './Avatar';
7+
import Text from './Text';
8+
9+
export type CombineProps = Omit<IconCombineProps, 'Icon' | 'Text'>;
10+
11+
const Combine = memo<CombineProps>(({ ...rest }) => {
12+
return (
13+
<IconCombine
14+
Icon={Avatar as any}
15+
Text={Text as any}
16+
aria-label={TITLE}
17+
spaceMultiple={SPACE_MULTIPLE}
18+
textMultiple={TEXT_MULTIPLE}
19+
{...rest}
20+
/>
21+
);
22+
});
23+
24+
export default Combine;

src/Groq/index.md

+14
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,20 @@ import { Groq } from '@lobehub/icons';
2323
export default () => <Groq.Text size={48} />;
2424
```
2525

26+
## Combine
27+
28+
```tsx
29+
import { Groq } from '@lobehub/icons';
30+
import { Flexbox } from 'react-layout-kit';
31+
32+
export default () => (
33+
<Flexbox gap={16}>
34+
<Groq.Combine size={64} />
35+
<Groq.Combine size={64} type={'color'} />
36+
</Flexbox>
37+
);
38+
```
39+
2640
## Avatars
2741

2842
```tsx

src/types/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,9 @@ export type IconType = ForwardRefExoticComponent<
449449
| 'onPointerCancel'
450450
| 'onPointerCancelCapture'
451451
| 'onPointerEnter'
452-
| 'onPointerEnterCapture'
452+
// | 'onPointerEnterCapture'
453453
| 'onPointerLeave'
454-
| 'onPointerLeaveCapture'
454+
// | 'onPointerLeaveCapture'
455455
| 'onPointerOver'
456456
| 'onPointerOverCapture'
457457
| 'onPointerOut'

0 commit comments

Comments
 (0)