-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move @/ui/display/icon to twenty-ui
Part of #4766
- Loading branch information
1 parent
1f98bc8
commit 2ea5ab0
Showing
25 changed files
with
88 additions
and
4,270 deletions.
There are no files selected for viewing
12 changes: 0 additions & 12 deletions
12
packages/twenty-front/src/modules/ui/display/icon/components/IconAddressBook.tsx
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
packages/twenty-front/src/modules/ui/display/icon/components/IconTwentyStar.tsx
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
packages/twenty-front/src/modules/ui/display/icon/components/IconTwentyStarFilled.tsx
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
packages/twenty-front/src/modules/ui/display/icon/states/iconsState.ts
This file was deleted.
Oops, something went wrong.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
14 changes: 14 additions & 0 deletions
14
packages/twenty-ui/src/display/icon/components/IconAddressBook.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { useTheme } from '@emotion/react'; | ||
|
||
import IconAddressBookRaw from '@ui/display/icon/assets/address-book.svg?react'; | ||
import { IconComponentProps } from '@ui/display/icon/types/IconComponent'; | ||
|
||
type IconAddressBookProps = Pick<IconComponentProps, 'size' | 'stroke'>; | ||
|
||
export const IconAddressBook = (props: IconAddressBookProps) => { | ||
const theme = useTheme(); | ||
const size = props.size ?? 24; | ||
const stroke = props.stroke ?? theme.icon.stroke.md; | ||
|
||
return <IconAddressBookRaw height={size} width={size} strokeWidth={stroke} />; | ||
}; |
7 changes: 3 additions & 4 deletions
7
.../ui/display/icon/components/IconGmail.tsx → ...src/display/icon/components/IconGmail.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
...ui/display/icon/components/IconGoogle.tsx → ...rc/display/icon/components/IconGoogle.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
...ay/icon/components/IconGoogleCalendar.tsx → ...ay/icon/components/IconGoogleCalendar.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
packages/twenty-ui/src/display/icon/components/IconTwentyStar.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { useTheme } from '@emotion/react'; | ||
|
||
import IconTwentyStarRaw from '@ui/display/icon/assets/twenty-star.svg?react'; | ||
import { IconComponentProps } from '@ui/display/icon/types/IconComponent'; | ||
|
||
type IconTwentyStarProps = Pick<IconComponentProps, 'size' | 'stroke'>; | ||
|
||
export const IconTwentyStar = (props: IconTwentyStarProps) => { | ||
const theme = useTheme(); | ||
const size = props.size ?? 24; | ||
const stroke = props.stroke ?? theme.icon.stroke.md; | ||
|
||
return <IconTwentyStarRaw height={size} width={size} strokeWidth={stroke} />; | ||
}; |
16 changes: 16 additions & 0 deletions
16
packages/twenty-ui/src/display/icon/components/IconTwentyStarFilled.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { useTheme } from '@emotion/react'; | ||
|
||
import IconTwentyStarFilledRaw from '@ui/display/icon/assets/twenty-star-filled.svg?react'; | ||
import { IconComponentProps } from '@ui/display/icon/types/IconComponent'; | ||
|
||
type IconTwentyStarFilledProps = Pick<IconComponentProps, 'size' | 'stroke'>; | ||
|
||
export const IconTwentyStarFilled = (props: IconTwentyStarFilledProps) => { | ||
const theme = useTheme(); | ||
const size = props.size ?? 24; | ||
const stroke = props.stroke ?? theme.icon.stroke.md; | ||
|
||
return ( | ||
<IconTwentyStarFilledRaw height={size} width={size} strokeWidth={stroke} /> | ||
); | ||
}; |
8 changes: 6 additions & 2 deletions
8
...lay/icon/hooks/__tests__/useIcons.test.ts → ...lay/icon/hooks/__tests__/useIcons.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...modules/ui/display/icon/hooks/useIcons.ts → ...nty-ui/src/display/icon/hooks/useIcons.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.