chore: setup twenty-ui absolute path alias (#4732)
Split from https://github.com/twentyhq/twenty/pull/4518 - Setup `@ui/*` as an internal alias to reference `twenty-ui/src`. - Configures twenty-front to understand the `@ui/*` alias on development mode, so twenty-ui can be hot reloaded. - When building on production mode, twenty-front needs twenty-ui to be built beforehand (which is automatic with the `dependsOn` option). - Configures twenty-front to understand the `@ui/*` alias when launching tests, so there is no need to re-build twenty-ui for tests. --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import styled from '@emotion/styled';
|
||||
import { Tag } from 'tsup.ui.index';
|
||||
|
||||
import { IconComponent } from '@/ui/display/icon/types/IconComponent';
|
||||
import { Tag } from '@/ui/display/tag/components/Tag';
|
||||
import { Checkbox } from '@/ui/input/components/Checkbox';
|
||||
import { MenuItemLeftContent } from '@/ui/navigation/menu-item/internals/components/MenuItemLeftContent';
|
||||
import { ThemeColor } from '@/ui/theme/constants/MainColorNames';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { useTheme } from '@emotion/react';
|
||||
import { Tag } from 'tsup.ui.index';
|
||||
import { IconCheck } from 'twenty-ui';
|
||||
|
||||
import { Tag } from '@/ui/display/tag/components/Tag';
|
||||
import { ThemeColor } from '@/ui/theme/constants/MainColorNames';
|
||||
|
||||
import { StyledMenuItemLeftContent } from '../internals/components/StyledMenuItemBase';
|
||||
|
||||
@ -23,7 +23,9 @@ export const Default: Story = {
|
||||
LeftIcon: IconBell,
|
||||
accent: 'default',
|
||||
iconButtons: [
|
||||
// eslint-disable-next-line no-console
|
||||
{ Icon: IconBell, onClick: () => console.log('Clicked') },
|
||||
// eslint-disable-next-line no-console
|
||||
{ Icon: IconBell, onClick: () => console.log('Clicked') },
|
||||
],
|
||||
},
|
||||
@ -85,11 +87,13 @@ export const Catalog: CatalogStory<Story, typeof MenuItem> = {
|
||||
{
|
||||
Icon: IconBell,
|
||||
onClick: () =>
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Clicked on first icon button'),
|
||||
},
|
||||
{
|
||||
Icon: IconBell,
|
||||
onClick: () =>
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Clicked on second icon button'),
|
||||
},
|
||||
],
|
||||
|
||||
@ -24,7 +24,9 @@ export const Default: Story = {
|
||||
args: {
|
||||
LeftIcon: IconBell,
|
||||
accent: 'default',
|
||||
// eslint-disable-next-line no-console
|
||||
iconButtons: [{ Icon: IconMinus, onClick: () => console.log('Clicked') }],
|
||||
// eslint-disable-next-line no-console
|
||||
onClick: () => console.log('Clicked'),
|
||||
text: 'Menu item draggable',
|
||||
isDragDisabled: false,
|
||||
@ -86,6 +88,7 @@ export const Catalog: Story = {
|
||||
{
|
||||
Icon: IconMinus,
|
||||
onClick: () =>
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Clicked on minus icon button'),
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user