mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-23 12:02:10 +03:00
Migrate to twenty-ui - input/color-scheme (#7995)
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 <gitstart-twenty@users.noreply.github.com> Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
parent
5ad8ff81f9
commit
67fb750ef6
@ -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';
|
||||
|
@ -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';
|
||||
|
@ -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'>
|
@ -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;
|
@ -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';
|
||||
|
@ -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
packages/twenty-ui/src/input/types/ColorScheme.ts
Normal file
1
packages/twenty-ui/src/input/types/ColorScheme.ts
Normal file
@ -0,0 +1 @@
|
||||
export type ColorScheme = 'Dark' | 'Light' | 'System';
|
@ -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 (
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user