Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to twenty-ui - input/color-scheme #7995

Merged
merged 2 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { H2Title } from 'twenty-ui';
import { ColorSchemePicker, H2Title } from 'twenty-ui';

import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';
import { getSettingsPagePath } from '@/settings/utils/getSettingsPagePath';
import { SettingsPath } from '@/types/SettingsPath';
import { ColorSchemePicker } from '@/ui/input/color-scheme/components/ColorSchemePicker';
import { SubMenuTopBarContainer } from '@/ui/layout/page/components/SubMenuTopBarContainer';
import { Section } from '@/ui/layout/section/components/Section';
import { useColorScheme } from '@/ui/theme/hooks/useColorScheme';
Expand Down
2 changes: 0 additions & 2 deletions packages/twenty-front/tsup.ui.index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ export { ThemeProvider } from '@emotion/react';
export * from 'twenty-ui';
export * from './src/modules/ui/feedback/progress-bar/components/CircularProgressBar';
export * from './src/modules/ui/feedback/progress-bar/components/ProgressBar';
export * from './src/modules/ui/input/color-scheme/components/ColorSchemeCard';
export * from './src/modules/ui/input/color-scheme/components/ColorSchemePicker';
export * from './src/modules/ui/input/components/AutosizeTextInput';
export * from './src/modules/ui/input/components/Checkbox';
export * from './src/modules/ui/input/components/EntityTitleDoubleTextInput';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import React from 'react';
import styled from '@emotion/styled';
import { Checkmark } from '@ui/display/checkmark/components/Checkmark';
import { ColorScheme } from '@ui/input/types/ColorScheme';
import {
AnimatePresence,
AnimationControls,
motion,
useAnimation,
} from 'framer-motion';
import { Checkmark } from 'twenty-ui';

import { ColorScheme } from '@/workspace-member/types/WorkspaceMember';
import React from 'react';

const StyledColorSchemeBackground = styled.div<
Pick<ColorSchemeCardProps, 'variant'>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import React from 'react';
import styled from '@emotion/styled';

import { ColorScheme } from '@/workspace-member/types/WorkspaceMember';

import { ColorScheme } from '@ui/input/types/ColorScheme';
import { MOBILE_VIEWPORT } from '@ui/theme';
import { ColorSchemeCard } from './ColorSchemeCard';
import { MOBILE_VIEWPORT } from 'twenty-ui';

const StyledContainer = styled.div`
display: flex;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from '@emotion/styled';
import { Meta, StoryObj } from '@storybook/react';
import { ComponentDecorator } from 'twenty-ui';
import { ComponentDecorator } from '@ui/testing';

import { ColorSchemeCard } from '../ColorSchemeCard';

Expand Down
3 changes: 3 additions & 0 deletions packages/twenty-ui/src/input/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@ export * from './button/components/LightIconButton';
export * from './button/components/LightIconButtonGroup';
export * from './button/components/MainButton';
export * from './button/components/RoundedIconButton';
export * from './color-scheme/components/ColorSchemeCard';
export * from './color-scheme/components/ColorSchemePicker';
export * from './components/Toggle';
export * from './types/ColorScheme';
1 change: 1 addition & 0 deletions packages/twenty-ui/src/input/types/ColorScheme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type ColorScheme = 'Dark' | 'Light' | 'System';
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Represents different color schemes and is specially tailored for light and dark
<ArticleTabs label1="Usage" label2="Props">
<ArticleTab>

<SandpackEditor content={`import { ColorSchemeCard } from "@/ui/input/color-scheme/components/ColorSchemeCard";
<SandpackEditor content={`import { ColorSchemeCard } from "twenty-ui";

export const MyComponent = () => {
return (
Expand Down Expand Up @@ -43,7 +43,7 @@ Allows users to choose between different color schemes.
<ArticleTabs label1="Usage" label2="Props">
<ArticleTab>

<SandpackEditor content={`import { ColorSchemePicker } from "@/ui/input/color-scheme/components/ColorSchemePicker";
<SandpackEditor content={`import { ColorSchemePicker } from "twenty-ui";

export const MyComponent = () => {
return <ColorSchemePicker
Expand Down
Loading