Skip to content

Commit

Permalink
🐛 fix: fix Groq Combine (#15)
Browse files Browse the repository at this point in the history
* Create Combine.tsx (#14)

* 📝 docs: update groq

* 🐛 fix: fix type

* 💄 style: update style

---------

Co-authored-by: Jiaqi Cai <[email protected]>
  • Loading branch information
arvinxx and jcdiv47 authored Mar 15, 2024
1 parent 035232a commit 79be47e
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
24 changes: 24 additions & 0 deletions src/Groq/components/Combine.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { memo } from 'react';

import IconCombine, { type IconCombineProps } from '@/IconCombine';

import { SPACE_MULTIPLE, TEXT_MULTIPLE, TITLE } from '../style';
import Avatar from './Avatar';
import Text from './Text';

export type CombineProps = Omit<IconCombineProps, 'Icon' | 'Text'>;

const Combine = memo<CombineProps>(({ ...rest }) => {
return (
<IconCombine
Icon={Avatar as any}
Text={Text as any}
aria-label={TITLE}
spaceMultiple={SPACE_MULTIPLE}
textMultiple={TEXT_MULTIPLE}
{...rest}
/>
);
});

export default Combine;
14 changes: 14 additions & 0 deletions src/Groq/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ import { Groq } from '@lobehub/icons';
export default () => <Groq.Text size={48} />;
```

## Combine

```tsx
import { Groq } from '@lobehub/icons';
import { Flexbox } from 'react-layout-kit';

export default () => (
<Flexbox gap={16}>
<Groq.Combine size={64} />
<Groq.Combine size={64} type={'color'} />
</Flexbox>
);
```

## Avatars

```tsx
Expand Down
4 changes: 2 additions & 2 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,9 @@ export type IconType = ForwardRefExoticComponent<
| 'onPointerCancel'
| 'onPointerCancelCapture'
| 'onPointerEnter'
| 'onPointerEnterCapture'
// | 'onPointerEnterCapture'
| 'onPointerLeave'
| 'onPointerLeaveCapture'
// | 'onPointerLeaveCapture'
| 'onPointerOver'
| 'onPointerOverCapture'
| 'onPointerOut'
Expand Down

0 comments on commit 79be47e

Please sign in to comment.