From c2b2ef861a5c4d0fcc931c5267120a8ee51a1d2a Mon Sep 17 00:00:00 2001 From: Daniel Schiavini Date: Thu, 23 Jan 2025 11:21:26 +0100 Subject: [PATCH 1/2] refactor: remove unused theme variables --- .../curve-ui-kit/src/themes/design/2_theme.ts | 38 ++++--------------- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/packages/curve-ui-kit/src/themes/design/2_theme.ts b/packages/curve-ui-kit/src/themes/design/2_theme.ts index 35a5ccb6f..4dbbe253c 100644 --- a/packages/curve-ui-kit/src/themes/design/2_theme.ts +++ b/packages/curve-ui-kit/src/themes/design/2_theme.ts @@ -1,4 +1,4 @@ -import { Blues, Grays, Greens, Reds, Violet, TransitionFunction } from './0_primitives' +import { Blues, Grays, Greens, Reds, TransitionFunction, Violet } from './0_primitives' import { SurfacesAndText } from './1_surfaces_text' const { plain, inverted } = SurfacesAndText @@ -148,13 +148,6 @@ export const createLightDesign = (Light: typeof plain.Light | typeof inverted.Li }, } as const - const Feedback = { - Success: Greens[300], - Info: Layer[3].Fill, - Warning: Reds[400], - Error: Reds[500], - } as const - const Tabs = { Transition, UnderLined: { @@ -246,7 +239,7 @@ export const createLightDesign = (Light: typeof plain.Light | typeof inverted.Li Default: Grays[400], Active: Light.Text.highlight, Filled: Grays[850], - Error: Feedback.Error, + Error: Reds[500], }, }, Nested: { @@ -256,7 +249,7 @@ export const createLightDesign = (Light: typeof plain.Light | typeof inverted.Li Default: Grays[400], Active: Light.Text.highlight, Filled: Grays[850], - Error: Feedback.Error, + Error: Reds[500], }, }, }, @@ -285,7 +278,6 @@ export const createLightDesign = (Light: typeof plain.Light | typeof inverted.Li Color, Text, Button, - Feedback, Layer, Tabs, Chips, @@ -493,13 +485,6 @@ export const createDarkDesign = (Dark: typeof plain.Dark | typeof inverted.Dark) }, } as const - const Feedback = { - Success: Greens[400], - Info: Layer[3].Fill, - Warning: Reds[300], - Error: Reds[500], - } as const - const Tabs = { Transition, UnderLined: { @@ -589,7 +574,7 @@ export const createDarkDesign = (Dark: typeof plain.Dark | typeof inverted.Dark) Default: color[600], Active: Dark.Text.highlight, Filled: color[75], - Error: Feedback.Error, + Error: Reds[500], }, }, Nested: { @@ -599,7 +584,7 @@ export const createDarkDesign = (Dark: typeof plain.Dark | typeof inverted.Dark) Default: color[600], Active: Dark.Text.highlight, Filled: color[75], - Error: Feedback.Error, + Error: Reds[500], }, }, }, @@ -628,7 +613,6 @@ export const createDarkDesign = (Dark: typeof plain.Dark | typeof inverted.Dark) Color, Text, Button, - Feedback, Layer, Tabs, Chips, @@ -779,13 +763,6 @@ export const createChadDesign = (Chad: typeof plain.Chad | typeof inverted.Chad) }, } as const - const Feedback = { - Success: Greens[400], - Info: Layer[3].Fill, - Warning: Reds[400], - Error: Reds[500], - } as const - const Tabs = { Transition, UnderLined: { @@ -877,7 +854,7 @@ export const createChadDesign = (Chad: typeof plain.Chad | typeof inverted.Chad) Default: Violet[200], Active: Chad.Text.highlight, Filled: Violet[400], - Error: Feedback.Error, + Error: Reds[500], }, }, Nested: { @@ -887,7 +864,7 @@ export const createChadDesign = (Chad: typeof plain.Chad | typeof inverted.Chad) Default: Violet[200], Active: Chad.Text.highlight, Filled: Violet[400], - Error: Feedback.Error, + Error: Reds[500], }, }, }, @@ -916,7 +893,6 @@ export const createChadDesign = (Chad: typeof plain.Chad | typeof inverted.Chad) Color, Text, Button, - Feedback, Layer, Tabs, Chips, From 76fa9fa9be0ad5312f6e18802fcc36dfeb183bf5 Mon Sep 17 00:00:00 2001 From: Daniel Schiavini Date: Thu, 23 Jan 2025 14:12:34 +0100 Subject: [PATCH 2/2] fix: unused variable --- packages/curve-ui-kit/src/themes/palette/palette.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/curve-ui-kit/src/themes/palette/palette.ts b/packages/curve-ui-kit/src/themes/palette/palette.ts index ccab6d075..0b8d53538 100644 --- a/packages/curve-ui-kit/src/themes/palette/palette.ts +++ b/packages/curve-ui-kit/src/themes/palette/palette.ts @@ -3,7 +3,7 @@ import { PaletteOptions } from '@mui/material' export const createPalette = ( mode: 'light' | 'dark', - { Layer, Color, Feedback, Text: { TextColors } }: DesignSystem, + { Layer, Color, Text: { TextColors } }: DesignSystem, ): PaletteOptions => ({ mode, primary: { main: Color.Primary[500] },