File tree Expand file tree Collapse file tree 11 files changed +290
-3
lines changed Expand file tree Collapse file tree 11 files changed +290
-3
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 6
6
order : 888
7
7
---
8
8
9
+ ## SVG Editor
10
+
11
+ - SVG Minifier: < https://svgminify.com >
12
+
9
13
<code src =" ../../src/components/Editor/index.tsx " inline ></code >
Original file line number Diff line number Diff line change
1
+ import { memo } from 'react' ;
2
+
3
+ import IconAvatar , { type IconAvatarProps } from '@/features/IconAvatar' ;
4
+
5
+ import { COLOR_PRIMARY , TITLE } from '../style' ;
6
+ import Mono from './Mono' ;
7
+
8
+ export type AvatarProps = Omit < IconAvatarProps , 'Icon' > ;
9
+
10
+ const Avatar = memo < AvatarProps > ( ( { background, ...rest } ) => {
11
+ return (
12
+ < IconAvatar Icon = { Mono } aria-label = { TITLE } background = { background || COLOR_PRIMARY } { ...rest } />
13
+ ) ;
14
+ } ) ;
15
+
16
+ export default Avatar ;
Original file line number Diff line number Diff line change
1
+ import { forwardRef } from 'react' ;
2
+
3
+ import type { IconType } from '@/types' ;
4
+
5
+ import { TITLE } from '../style' ;
6
+
7
+ const Icon : IconType = forwardRef ( ( { size = '1em' , style, ...rest } , ref ) => {
8
+ return (
9
+ < svg
10
+ height = { size }
11
+ ref = { ref }
12
+ style = { { flex : 'none' , lineHeight : 1 , ...style } }
13
+ viewBox = "0 0 24 24"
14
+ width = { size }
15
+ xmlns = "http://www.w3.org/2000/svg"
16
+ { ...rest }
17
+ >
18
+ < title > { TITLE } </ title >
19
+ < path
20
+ d = "M11.995 20.216a1.892 1.892 0 100 3.785 1.892 1.892 0 000-3.785zm0 2.806a.927.927 0 11.927-.914.914.914 0 01-.927.914z"
21
+ fill = "#4285F4"
22
+ > </ path >
23
+ < path
24
+ clipRule = "evenodd"
25
+ d = "M21.687 14.144c.237.038.452.16.605.344a.978.978 0 01-.18 1.3l-8.24 6.082a1.892 1.892 0 00-1.147-1.508l8.28-6.08a.991.991 0 01.682-.138z"
26
+ fill = "#669DF6"
27
+ fillRule = "evenodd"
28
+ > </ path >
29
+ < path
30
+ clipRule = "evenodd"
31
+ d = "M10.122 21.842l-8.217-6.066a.952.952 0 01-.206-1.287.978.978 0 011.287-.206l8.28 6.08a1.893 1.893 0 00-1.144 1.479z"
32
+ fill = "#AECBFA"
33
+ fill
F438
Rule = "evenodd"
34
+ > </ path >
35
+ < path
36
+ d = "M4.273 4.475a.978.978 0 01-.965-.965V1.09a.978.978 0 111.943 0v2.42a.978.978 0 01-.978.965zM4.247 13.034a.978.978 0 100-1.956.978.978 0 000 1.956zM4.247 10.19a.978.978 0 100-1.956.978.978 0 000 1.956zM4.247 7.332a.978.978 0 100-1.956.978.978 0 000 1.956z"
37
+ fill = "#AECBFA"
38
+ > </ path >
39
+ < path
40
+ d = "M19.718 7.307a.978.978 0 01-.965-.979v-2.42a.965.965 0 011.93 0v2.42a.964.964 0 01-.965.979zM19.743 13.047a.978.978 0 100-1.956.978.978 0 000 1.956zM19.743 10.151a.978.978 0 100-1.956.978.978 0 000 1.956zM19.743 2.068a.978.978 0 100-1.956.978.978 0 000 1.956z"
41
+ fill = "#4285F4"
42
+ > </ path >
43
+ < path
44
+ d = "M11.995 15.917a.978.978 0 01-.965-.965v-2.459a.978.978 0 011.943 0v2.433a.976.976 0 01-.978.991zM11.995 18.762a.978.978 0 100-1.956.978.978 0 000 1.956zM11.995 10.64a.978.978 0 100-1.956.978.978 0 000 1.956zM11.995 7.783a.978.978 0 100-1.956.978.978 0 000 1.956z"
45
+ fill = "#669DF6"
46
+ > </ path >
47
+ < path
48
+ d = "M15.856 10.177a.978.978 0 01-.965-.965v-2.42a.977.977 0 011.702-.763.979.979 0 01.241.763v2.42a.978.978 0 01-.978.965zM15.869 4.913a.978.978 0 100-1.956.978.978 0 000 1.956zM15.869 15.853a.978.978 0 100-1.956.978.978 0 000 1.956zM15.869 12.996a.978.978 0 100-1.956.978.978 0 000 1.956z"
49
+ fill = "#4285F4"
50
+ > </ path >
51
+ < path
52
+ d = "M8.121 15.853a.978.978 0 100-1.956.978.978 0 000 1.956zM8.121 7.783a.978.978 0 100-1.956.978.978 0 000 1.956zM8.121 4.913a.978.978 0 100-1.957.978.978 0 000 1.957zM8.134 12.996a.978.978 0 01-.978-.94V9.611a.965.965 0 011.93 0v2.445a.966.966 0 01-.952.94z"
53
+ fill = "#AECBFA"
54
+ > </ path >
55
+ </ svg >
56
+ ) ;
57
+ } ) ;
58
+
59
+ export default Icon ;
Original file line number Diff line number Diff line change
1
+ import { memo } from 'react' ;
2
+
3
+ import IconCombine , { type IconCombineProps } from '@/features/IconCombine' ;
4
+
5
+ import { SPACE_MULTIPLE , TEXT_MULTIPLE , TITLE } from '../style' ;
6
+ import Color from './Color' ;
7
+ import Mono from './Mono' ;
8
+ import Text from './Text' ;
9
+
10
+ export interface CombineProps extends Omit < IconCombineProps , 'Icon' | 'Text' > {
11
+ type ?: 'color' | 'mono' ;
12
+ }
13
+ const Combine = memo < CombineProps > ( ( { type = 'mono' , ...rest } ) => {
14
+ const Icon = type === 'color' ? Color : Mono ;
15
+
16
+ return (
17
+ < IconCombine
18
+ Icon = { Icon }
19
+ Text = { Text }
20
+ aria-label = { TITLE }
21
+ spaceMultiple = { SPACE_MULTIPLE }
22
+ textMultiple = { TEXT_MULTIPLE }
23
+ { ...rest }
24
+ />
25
+ ) ;
26
+ } ) ;
27
+
28
+ export default Combine ;
Original file line number Diff line number Diff line change
1
+ import { forwardRef } from 'react' ;
2
+
3
+ import type { IconType } from '@/types' ;
4
+
5
+ import { TITLE } from '../style' ;
6
+
7
+ const Icon : IconType = forwardRef ( ( { size = '1em' , style, ...rest } , ref ) => {
8
+ return (
9
+ < svg
10
+ fill = "currentColor"
11
+ fillRule = "evenodd"
12
+ height = { size }
13
+ ref = { ref }
14
+ style = { { flex : 'none' , lineHeight : 1 , ...style } }
15
+ viewBox = "0 0 24 24"
16
+ width = { size }
17
+ xmlns = "http://www.w3.org/2000/svg"
18
+ { ...rest }
19
+ >
20
+ < title > { TITLE } </ title >
21
+ < path d = "M11.995 20.216a1.892 1.892 0 100 3.785 1.892 1.892 0 000-3.785zm0 2.806a.927.927 0 11.927-.914.914.914 0 01-.927.914z" > </ path >
22
+ < path
23
+ clipRule = "evenodd"
24
+ d = "M21.687 14.144c.237.038.452.16.605.344a.978.978 0 01-.18 1.3l-8.24 6.082a1.892 1.892 0 00-1.147-1.508l8.28-6.08a.991.991 0 01.682-.138z"
25
+ > </ path >
26
+ < path
27
+ clipRule = "evenodd"
28
+ d = "M10.122 21.842l-8.217-6.066a.952.952 0 01-.206-1.287.978.978 0 011.287-.206l8.28 6.08a1.893 1.893 0 00-1.144 1.479z"
29
+ > </ path >
30
+ < path d = "M4.273 4.475a.978.978 0 01-.965-.965V1.09a.978.978 0 111.943 0v2.42a.978.978 0 01-.978.965zM4.247 13.034a.978.978 0 100-1.956.978.978 0 000 1.956zM4.247 10.19a.978.978 0 100-1.956.978.978 0 000 1.956zM4.247 7.332a.978.978 0 100-1.956.978.978 0 000 1.956z" > </ path >
31
+ < path d = "M19.718 7.307a.978.978 0 01-.965-.979v-2.42a.965.965 0 011.93 0v2.42a.964.964 0 01-.965.979zM19.743 13.047a.978.978 0 100-1.956.978.978 0 000 1.956zM19.743 10.151a.978.978 0 100-1.956.978.978 0 000 1.956zM19.743 2.068a.978.978 0 100-1.956.978.978 0 000 1.956z" > </ path >
32
+ < path d = "M11.995 15.917a.978.978 0 01-.965-.965v-2.459a.978.978 0 011.943 0v2.433a.976.976 0 01-.978.991zM11.995 18.762a.978.978 0 100-1.956.978.978 0 000 1.956zM11.995 10.64a.978.978 0 100-1.956.978.978 0 000 1.956zM11.995 7.783a.978.978 0 100-1.956.978.978 0 000 1.956z" > </ path >
33
+ < path d = "M15.856 10.177a.978.978 0 01-.965-.965v-2.42a.977.977 0 011.702-.763.979.979 0 01.241.763v2.42a.978.978 0 01-.978.965zM15.869 4.913a.978.978 0 100-1.956.978.978 0 000 1.956zM15.869 15.853a.978.978 0 100-1.956.978.978 0 000 1.956zM15.869 12.996a.978.978 0 100-1.956.978.978 0 000 1.956z" > </ path >
34
+ < path d = "M8.121 15.853a.978.978 0 100-1.956.978.978 0 000 1.956zM8.121 7.783a.978.978 0 100-1.956.978.978 0 000 1.956zM8.121 4.913a.978.978 0 100-1.957.978.978 0 000 1.957zM8.134 12.996a.978.978 0 01-.978-.94V9.611a.965.965 0 011.93 0v2.445a.966.966 0 01-.952.94z" > </ path >
35
+ </ svg >
36
+ ) ;
37
+ } ) ;
38
+
39
+ export default Icon ;
Original file line number Diff line number Diff line change
1
+ import { forwardRef } from 'react' ;
2
+
3
+ import type { IconType } from '@/types' ;
4
+
5
+ import { TITLE } from '../style' ;
6
+
7
+ const Icon : IconType = forwardRef ( ( { size = '1em' , style, ...rest } , ref ) => {
8
+ return (
9
+ < svg
10
+ fill = "currentColor"
11
+ fillRule = "evenodd"
12
+ height = { size }
13
+ ref = { ref }
14
+ style = { { flex : 'none' , lineHeight : 1 , ...style } }
15
+ viewBox = "0 0 119 24"
16
+ xmlns = "http://www.w3.org/2000/svg"
17
+ { ...rest }
18
+ >
19
+ < title > { TITLE } </ title >
20
+ < path d = "M8.574 21.52h2.885L19.273 0h-3.065l-6.131 17.462h-.12L4.065 0H1l7.574 21.52z" > </ path >
21
+ < path
22
+ clipRule = "evenodd"
23
+ d = "M95.287 21.519h-3.066L100.336 0h3.125l8.115 21.519h-3.065l-2.074-5.83h-9.046l-2.104 5.83zm6.552-18.123l-3.516 9.708h7.152l-3.516-9.708h-.12z"
24
+ > </ path >
25
+ < path d = "M116.865 21.52H114.1V0h2.765v21.52zM85.936 21.519l-5.26-7.484 5.14-7.243H82.57l-3.456 5.2-3.637-5.2H72.35l5.08 7.243-5.2 7.484h3.246l3.576-5.44 3.637 5.44h3.246z" > </ path >
26
+ < path
27
+ clipRule = "evenodd"
28
+ d = "M64.465 22c-2.164 0-3.947-.741-5.35-2.224-1.402-1.483-2.104-3.356-2.104-5.62 0-2.244.682-4.108 2.044-5.59 1.363-1.503 3.106-2.255 5.23-2.255 2.184 0 3.917.712 5.2 2.134 1.301 1.403 1.953 3.376 1.953 5.921l-.03.3H59.837c.04 1.443.52 2.605 1.442 3.487.922.882 2.024 1.322 3.306 1.322 1.763 0 3.146-.881 4.148-2.644l2.464 1.202a7.313 7.313 0 01-2.765 2.915C67.27 21.65 65.948 22 64.465 22zm-4.418-9.617h8.445c-.08-1.022-.5-1.864-1.262-2.525-.741-.681-1.743-1.022-3.006-1.022-1.041 0-1.943.32-2.704.962-.742.64-1.233 1.502-1.473 2.584z"
29
+ > </ path >
30
+ < path d = "M50.174 20.648c.801.741 1.803 1.112 3.006 1.112.961 0 1.803-.13 2.524-.39l-.872-2.465c-.18.08-.38.15-.6.21-.2.04-.411.06-.632.06-.48 0-.911-.17-1.292-.51-.38-.361-.571-1.032-.571-2.014V9.317h3.606V6.793h-3.606V2.285h-2.765v4.508h-2.585v2.524h2.585v8.235c.02 1.323.42 2.355 1.202 3.096zM38.573 6.792h-2.645V21.52h2.765v-8.114c0-1.223.41-2.224 1.232-3.006.842-.801 1.904-1.202 3.186-1.202l1.233.12V6.432l-.572-.06c-2.564 0-4.257.941-5.079 2.825h-.12V6.793z" > </ path >
31
+ < path
32
+ clipRule = "evenodd"
33
+ d = "M26.427 22c-2.164 0-3.947-.741-5.35-2.224-1.402-1.483-2.104-3.356-2.104-5.62 0-2.244.682-4.108 2.044-5.59 1.363-1.503 3.106-2.255 5.23-2.255 2.184 0 3.917.712 5.2 2.134 1.301 1.403 1.953 3.376 1.953 5.921l-.03.3H21.799c.04 1.443.52 2.605 1.442 3.487s2.024 1.322 3.306 1.322c1.763 0 3.146-.881 4.148-2.644l2.464 1.202a7.313 7.313 0 01-2.765 2.915C29.232 21.65 27.91 22 26.427 22zm-4.418-9.617h8.445c-.08-1.022-.5-1.864-1.262-2.525-.741-.681-1.743-1.022-3.006-1.022-1.041 0-1.943.32-2.704.962-.742.64-1.233 1.502-1.473 2.584z"
34
+ > </ path >
35
+ </ svg >
36
+ ) ;
37
+ } ) ;
38
+
39
+ export default Icon ;
Original file line number Diff line number Diff line change
1
+ ---
2
+ nav : Components
3
+ group : Provider
4
+ title : VertexAI (Google)
5
+ atomId : VertexAI
6
+ description : https://cloud.google.com/generative-ai-studio
7
+ ---
8
+
9
+ ## Icons
10
+
11
+ ``` tsx
12
+ import { VertexAI } from ' @lobehub/icons' ;
13
+ import { Flexbox } from ' react-layout-kit' ;
14
+
15
+ export default () => (
16
+ <Flexbox gap = { 16 } horizontal >
17
+ <VertexAI size = { 64 } />
18
+ <VertexAI.Color size = { 64 } />
19
+ </Flexbox >
20
+ );
21
+ ```
22
+
23
+ ## Text
24
+
25
+ ``` tsx
26
+ import { VertexAI } from ' @lobehub/icons' ;
27
+
28
+ export default () => <VertexAI.Text size = { 48 } />;
29
+ ```
30
+
31
+ ## Combine
32
+
33
+ ``` tsx
34
+ import { VertexAI } from ' @lobehub/icons' ;
35
+ import { Flexbox } from ' react-layout-kit' ;
36
+
37
+ export default () => (
38
+ <Flexbox gap = { 16 } >
39
+ <VertexAI.Combine size = { 64 } />
40
+ <VertexAI.Combine size = { 64 } type = { ' color' } />
41
+ </Flexbox >
42
+ );
43
+ ```
44
+
45
+ ## Avatars
46
+
47
+ ``` tsx
48
+ import { VertexAI } from ' @lobehub/icons' ;
49
+ import { Flexbox } from ' react-layout-kit' ;
50
+
51
+ export default () => (
52
+ <Flexbox gap = { 16 } horizontal >
53
+ <VertexAI.Avatar size = { 64 } />
54
+ <VertexAI.Avatar size = { 64 } shape = { ' square' } />
55
+ </Flexbox >
56
+ );
57
+ ```
58
+
59
+ ## Colors
60
+
61
+ ``` tsx
62
+ import { VertexAI } from ' @lobehub/icons' ;
63
+ import { Flexbox } from ' react-layout-kit' ;
64
+
65
+ import ColorPreview from ' ../components/ColorPreview' ;
66
+
67
+ export default () => (
68
+ <Flexbox gap = { 16 } horizontal >
69
+ <ColorPreview color = { VertexAI .colorPrimary } />
70
+ </Flexbox >
71
+ );
72
+ ```
Original file line number Diff line number Diff line change
1
+ import Avatar from './components/Avatar' ;
2
+ import Color from './components/Color' ;
3
+ import Combine from './components/Combine' ;
4
+ import Mono from './components/Mono' ;
5
+ import Text from './components/Text' ;
6
+ import { COLOR_PRIMARY , TITLE } from './style' ;
7
+
8
+ export type CompoundedIcon = typeof Mono & {
9
+ Avatar : typeof Avatar ;
10
+ Color : typeof Color ;
11
+ Combine : typeof Combine ;
12
+ Text : typeof Text ;
13
+ colorPrimary : string ;
14
+ title : string ;
15
+ } ;
16
+
17
+ const Icons = Mono as CompoundedIcon ;
18
+ Icons . Color = Color ;
19
+ Icons . Text = Text ;
20
+ Icons . Combine = Combine ;
21
+ Icons . Avatar = Avatar ;
22
+ Icons . colorPrimary = COLOR_PRIMARY ;
23
+ Icons . title = TITLE ;
24
+
25
+ export default Icons ;
Original file line number Diff line number Diff line change
1
+ export const TITLE = 'VertexAI' ;
2
+ export const TEXT_MULTIPLE = 0.6 ;
3
+ export const SPACE_MULTIPLE = 0.2 ;
4
+ export const COLOR_PRIMARY = '#4285F4' ;
You can’t perform that action at this time.
0 commit comments