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

feat(colors): Add card gradients to colors theme #61

Merged
Merged
Show file tree
Hide file tree
Changes from 3 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
12 changes: 6 additions & 6 deletions packages/pancake-uikit/src/components/Card/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export const light: CardTheme = {
boxShadowSuccess: shadows.success,
boxShadowWarning: shadows.warning,
cardHeaderBackground: {
default: "linear-gradient(111.68deg, #F2ECF2 0%, #E8F2F6 100%)",
blue: "linear-gradient(180deg, #A7E8F1 0%, #94E1F2 100%)",
violet: "linear-gradient(180deg, #E2C9FB 0%, #CDB8FA 100%)",
default: lightColors.gradients.cardBackground.default,
blue: lightColors.gradients.cardBackground.blue,
violet: lightColors.gradients.cardBackground.violet,
},
dropShadow: "drop-shadow(0px 1px 4px rgba(25, 19, 38, 0.15))",
};
Expand All @@ -23,9 +23,9 @@ export const dark: CardTheme = {
boxShadowSuccess: shadows.success,
boxShadowWarning: shadows.warning,
cardHeaderBackground: {
default: "linear-gradient(166.77deg, #3B4155 0%, #3A3045 100%)",
blue: "linear-gradient(180deg, #00707F 0%, #19778C 100%)",
violet: "linear-gradient(180deg, #6C4999 0%, #6D4DB2 100%)",
default: darkColors.gradients.cardBackground.default,
blue: darkColors.gradients.cardBackground.blue,
violet: darkColors.gradients.cardBackground.violet,
},
dropShadow: "drop-shadow(0px 1px 4px rgba(25, 19, 38, 0.15))",
};
10 changes: 10 additions & 0 deletions packages/pancake-uikit/src/theme/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ export const lightColors: Colors = {
card: "#FFFFFF",
gradients: {
bubblegum: "linear-gradient(139.73deg, #E6FDFF 0%, #F3EFFF 100%)",
cardBackground: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imo this should ba at the root like bubblegum (generic color)

Copy link
Contributor Author

@ChefHutch ChefHutch Apr 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure,

  gradients: {
    bubblegum: "linear-gradient(139.73deg, #313D5C 0%, #3D2A54 100%)",
    cardBackgroundDefault: "linear-gradient(166.77deg, #3B4155 0%, #3A3045 100%)",
    cardBackgroundBlue: "linear-gradient(180deg, #00707F 0%, #19778C 100%)",
    cardBackgroundViolet: "linear-gradient(180deg, #6C4999 0%, #6D4DB2 100%)",
  },

?

Or should we get bugs to come up with some fun, thematic names?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bubblegum is what is was called in Figma.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated this to remove nesting & reflect Figma color scheme

default: "linear-gradient(111.68deg, #F2ECF2 0%, #E8F2F6 100%)",
blue: "linear-gradient(180deg, #A7E8F1 0%, #94E1F2 100%)",
violet: "linear-gradient(180deg, #E2C9FB 0%, #CDB8FA 100%)",
},
},
};

Expand All @@ -55,5 +60,10 @@ export const darkColors: Colors = {
card: "#27262c",
gradients: {
bubblegum: "linear-gradient(139.73deg, #313D5C 0%, #3D2A54 100%)",
cardBackground: {
default: "linear-gradient(166.77deg, #3B4155 0%, #3A3045 100%)",
blue: "linear-gradient(180deg, #00707F 0%, #19778C 100%)",
violet: "linear-gradient(180deg, #6C4999 0%, #6D4DB2 100%)",
},
},
};
5 changes: 5 additions & 0 deletions packages/pancake-uikit/src/theme/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ export type Shadows = {

export type Gradients = {
bubblegum: string;
cardBackground: {
default: string;
blue: string;
violet: string;
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Gradients object should only be top-level values, i.e. no cardBackground. That means however we will need to come up with a name for default

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea makes sense not to nest them. Let me ping Bugs for some inspiration on 'default'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated this to remove nesting & reflect Figma color scheme

};

export type Colors = {
Expand Down