From 49f2030f9c25c1b21623798383ef97c17ac66009 Mon Sep 17 00:00:00 2001 From: CanisMinor Date: Thu, 1 Feb 2024 04:20:14 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20Add=20midjourney?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Midjourney/components/Avatar.tsx | 16 +++++++ src/Midjourney/components/Combine.tsx | 23 +++++++++ src/Midjourney/components/Mono.tsx | 23 +++++++++ src/Midjourney/components/Text.tsx | 22 +++++++++ src/Midjourney/index.md | 69 +++++++++++++++++++++++++++ src/Midjourney/index.ts | 20 ++++++++ src/Midjourney/style.ts | 3 ++ src/index.ts | 1 + 8 files changed, 177 insertions(+) create mode 100644 src/Midjourney/components/Avatar.tsx create mode 100644 src/Midjourney/components/Combine.tsx create mode 100644 src/Midjourney/components/Mono.tsx create mode 100644 src/Midjourney/components/Text.tsx create mode 100644 src/Midjourney/index.md create mode 100644 src/Midjourney/index.ts create mode 100644 src/Midjourney/style.ts diff --git a/src/Midjourney/components/Avatar.tsx b/src/Midjourney/components/Avatar.tsx new file mode 100644 index 0000000..29ee685 --- /dev/null +++ b/src/Midjourney/components/Avatar.tsx @@ -0,0 +1,16 @@ +import { memo } from 'react'; + +import IconAvatar, { type IconAvatarProps } from '@/IconAvatar'; + +import { COLOR_PRIMARY } from '../style'; +import Mono from './Mono'; + +export type AvatarProps = Omit; + +const Avatar = memo(({ background, ...rest }) => { + return ( + + ); +}); + +export default Avatar; diff --git a/src/Midjourney/components/Combine.tsx b/src/Midjourney/components/Combine.tsx new file mode 100644 index 0000000..3bef4f4 --- /dev/null +++ b/src/Midjourney/components/Combine.tsx @@ -0,0 +1,23 @@ +import { memo } from 'react'; + +import IconCombine, { type IconCombineProps } from '@/IconCombine'; + +import { SPACE_MULTIPLE, TEXT_MULTIPLE } from '../style'; +import Mono from './Mono'; +import Text from './Text'; + +export type CombineProps = Omit; + +const Combine = memo(({ ...rest }) => { + return ( + + ); +}); + +export default Combine; diff --git a/src/Midjourney/components/Mono.tsx b/src/Midjourney/components/Mono.tsx new file mode 100644 index 0000000..b6eb44d --- /dev/null +++ b/src/Midjourney/components/Mono.tsx @@ -0,0 +1,23 @@ +import { forwardRef } from 'react'; + +import type { IconType } from '@/types'; + +const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { + return ( + + + + ); +}); + +export default Icon; diff --git a/src/Midjourney/components/Text.tsx b/src/Midjourney/components/Text.tsx new file mode 100644 index 0000000..d32831b --- /dev/null +++ b/src/Midjourney/components/Text.tsx @@ -0,0 +1,22 @@ +import { forwardRef } from 'react'; + +import type { IconType } from '@/types'; + +const Icon: IconType = forwardRef(({ size = '1em', style, ...rest }, ref) => { + return ( + + + + ); +}); + +export default Icon; diff --git a/src/Midjourney/index.md b/src/Midjourney/index.md new file mode 100644 index 0000000..2cbc8f9 --- /dev/null +++ b/src/Midjourney/index.md @@ -0,0 +1,69 @@ +--- +nav: Components +group: Icons +title: Midjourney +atomId: Midjourney +description: https://midjourney.com +--- + +## Icons + +```tsx +import { Midjourney } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ; +``` + +## Text + +```tsx +import { Midjourney } from '@lobehub/icons'; + +export default () => ; +``` + +## Combine + +```tsx +import { Midjourney } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + +); +``` + +## Avatars + +```tsx +import { Midjourney } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +export default () => ( + + + + +); +``` + +## Colors + +```tsx +/** + * inline: true + */ +import { Midjourney } from '@lobehub/icons'; +import { Flexbox } from 'react-layout-kit'; + +import ColorPreview from '../components/ColorPreview'; + +export default () => ( + + + +); +``` diff --git a/src/Midjourney/index.ts b/src/Midjourney/index.ts new file mode 100644 index 0000000..619d2e0 --- /dev/null +++ b/src/Midjourney/index.ts @@ -0,0 +1,20 @@ +import Avatar from './components/Avatar'; +import Combine from './components/Combine'; +import Mono from './components/Mono'; +import Text from './components/Text'; +import { COLOR_PRIMARY } from './style'; + +export type CompoundedIcon = typeof Mono & { + Avatar: typeof Avatar; + Combine: typeof Combine; + Mono: typeof Mono; + Text: typeof Text; + colorPrimary: string; +}; + +const Icons = Mono as CompoundedIcon; +Icons.Text = Text; +Icons.Combine = Combine; +Icons.Avatar = Avatar; +Icons.colorPrimary = COLOR_PRIMARY; +export default Icons; diff --git a/src/Midjourney/style.ts b/src/Midjourney/style.ts new file mode 100644 index 0000000..8b8e4d3 --- /dev/null +++ b/src/Midjourney/style.ts @@ -0,0 +1,3 @@ +export const TEXT_MULTIPLE = 0.6; +export const SPACE_MULTIPLE = 0.2; +export const COLOR_PRIMARY = '#fff'; diff --git a/src/index.ts b/src/index.ts index 7bedffb..8bbb951 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,6 +9,7 @@ export { default as Dalle, type CompoundedIcon as DalleProps } from './Dalle'; export { default as Gemini, type CompoundedIcon as GeminiProps } from './Gemini'; export { default as IconAvatar, type IconAvatarProps } from './IconAvatar'; export { default as IconCombine, type IconCombineProps } from './IconCombine'; +export { default as Midjourney, type CompoundedIcon as MidjourneyProps } from './Midjourney'; export { default as Minimax, type CompoundedIcon as MinimaxProps } from './Minimax'; export { default as Mistral, type CompoundedIcon as MistralProps } from './Mistral'; export { default as Ollama, type CompoundedIcon as OllamaProps } from './Ollama';