refactor: move @/ui/display/icon to twenty-ui (#4820)
Split from https://github.com/twentyhq/twenty/pull/4518 Part of https://github.com/twentyhq/twenty/issues/4766
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import { BrowserRouter as Router } from "react-router-dom";
|
||||
import { EntityChip } from "@/ui/display/chip/components/EntityChip";
|
||||
import { IconComponent } from "@/ui/display/icon/types/IconComponent";
|
||||
import { BrowserRouter as Router } from 'react-router-dom';
|
||||
import { IconTwentyStar } from 'twenty-ui';
|
||||
|
||||
import { EntityChip } from '@/ui/display/chip/components/EntityChip';
|
||||
|
||||
export const MyComponent = () => {
|
||||
return (
|
||||
@ -12,7 +13,7 @@ export const MyComponent = () => {
|
||||
pictureUrl=""
|
||||
avatarType="rounded"
|
||||
variant="regular"
|
||||
LeftIcon={IconComponent}
|
||||
LeftIcon={IconTwentyStar}
|
||||
/>
|
||||
</Router>
|
||||
);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { IconAddressBook } from "@/ui/display/icon/components/IconAddressBook";
|
||||
import { IconAddressBook } from 'twenty-ui';
|
||||
|
||||
export const MyComponent = () => {
|
||||
return <IconAddressBook size={24} stroke={2} />;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import { RecoilRoot } from "recoil";
|
||||
import { Select } from "@/ui/input/components/Select";
|
||||
import { IconComponent } from "@/ui/display/icon/types/IconComponent";
|
||||
import { RecoilRoot } from 'recoil';
|
||||
import { IconTwentyStar } from 'twenty-ui';
|
||||
|
||||
import { Select } from '@/ui/input/components/Select';
|
||||
|
||||
export const MyComponent = () => {
|
||||
const handleSelectChange = (selectedValue) => {
|
||||
@ -16,8 +17,8 @@ export const MyComponent = () => {
|
||||
label="Select an option"
|
||||
onChange={handleSelectChange}
|
||||
options={[
|
||||
{ value: "option1", label: "Option A", Icon: IconComponent },
|
||||
{ value: "option2", label: "Option B", Icon: IconComponent },
|
||||
{ value: 'option1', label: 'Option A', Icon: IconTwentyStar },
|
||||
{ value: 'option2', label: 'Option B', Icon: IconTwentyStar },
|
||||
]}
|
||||
value="option1"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user