Skip to content

Commit

Permalink
Migrate to twenty-ui - input/color-scheme (#7995)
Browse files Browse the repository at this point in the history
This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-7063](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-7063).

 --- 

### Description

- Move color-scheme components to `twenty-ui`

Fixes  twentyhq/private-issues#93

Co-authored-by: gitstart-twenty <[email protected]>
Co-authored-by: Charles Bochet <[email protected]>
  • Loading branch information
3 people authored Oct 24, 2024
1 parent 5ad8ff8 commit 67fb750
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 15 deletions.
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

0 comments on commit 67fb750

Please sign in to comment.