Skip to content

Commit

Permalink
Add icons for text inspector controls (#5907)
Browse files Browse the repository at this point in the history
**Problem:**
New icons exposed on the component annotation API for the text inspector
controls.

**Manual Tests:**
I hereby swear that:

- [x] I opened a hydrogen project and it loaded
- [x] I could navigate to various routes in Preview mode
  • Loading branch information
gbalint authored Jun 12, 2024
1 parent 02c757d commit 5289026
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
70 changes: 70 additions & 0 deletions editor/src/uuiui/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,76 @@ export const Icons = {
width: 12,
height: 12,
}),
Italic: makeIcon({
category: 'inspector-element',
type: 'italic',
color: 'main',
width: 16,
height: 16,
}),
Underline: makeIcon({
category: 'inspector-element',
type: 'underline',
color: 'main',
width: 16,
height: 16,
}),
Strikethrough: makeIcon({
category: 'inspector-element',
type: 'strikethrough',
color: 'main',
width: 16,
height: 16,
}),
FontStyleSerif: makeIcon({
category: 'inspector-element',
type: 'fontStyle-serif',
color: 'main',
width: 16,
height: 16,
}),
FontStyleScript: makeIcon({
category: 'inspector-element',
type: 'fontStyle-script',
color: 'main',
width: 16,
height: 16,
}),
FontStyleMonospace: makeIcon({
category: 'inspector-element',
type: 'fontStyle-monospace',
color: 'main',
width: 16,
height: 16,
}),
FontStyleSansSerif: makeIcon({
category: 'inspector-element',
type: 'fontStyle-sansSerif',
color: 'main',
width: 16,
height: 16,
}),
TextAlignLeft: makeIcon({
category: 'inspector-element',
type: 'textAlign-left',
color: 'main',
width: 16,
height: 16,
}),
TextAlignCenter: makeIcon({
category: 'inspector-element',
type: 'textAlign-center',
color: 'main',
width: 16,
height: 16,
}),
TextAlignRight: makeIcon({
category: 'inspector-element',
type: 'textAlign-right',
color: 'main',
width: 16,
height: 16,
}),
} as const

export const FunctionIcons = {
Expand Down
10 changes: 10 additions & 0 deletions utopia-api/src/primitives/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,16 @@ export const UtopiaIcons = [
'StringInputControl',
'NavigatorText',
'NavigatorData',
'Italic',
'Underline',
'Strikethrough',
'FontStyleSerif',
'FontStyleScript',
'FontStyleMonospace',
'FontStyleSansSerif',
'TextAlignLeft',
'TextAlignCenter',
'TextAlignRight',
] as const

export type UtopiaIcon = (typeof UtopiaIcons)[number]

0 comments on commit 5289026

Please sign in to comment.