Skip to content

Commit

Permalink
fix: update buildLegacyTheme to satisfy updated color types
Browse files Browse the repository at this point in the history
  • Loading branch information
robinpyon committed Oct 17, 2023
1 parent 109cf8b commit d199784
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/sanity/src/core/theme/_legacy/color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export function buildColor(
bg,
border: blend(base.bg, tints[200]),
fg: blend(base.bg, buttonTones.bg),
iconColor: blend(base.bg, buttonTones.bg),
muted: {
fg: blend(base.bg, tints[50]),
},
Expand Down Expand Up @@ -129,6 +130,7 @@ export function buildColor(
bg,
border: blend(base.bg, tints[600]),
fg: blend(base.bg, buttonTones.bg),
iconColor: blend(base.bg, buttonTones.bg),
muted: {
fg: blend(base.bg, tints[200]),
},
Expand Down Expand Up @@ -157,6 +159,7 @@ export function buildColor(
bg,
border: blend(base.bg, tints[800]),
fg: blend(base.bg, buttonTones.bg),
iconColor: blend(base.bg, buttonTones.bg),
muted: {
fg: blend(base.bg, tints[200]),
},
Expand Down Expand Up @@ -189,6 +192,7 @@ export function buildColor(
bg,
border: blend(base.bg, tints[800]),
fg: blend(base.bg, buttonTones.bg),
iconColor: blend(base.bg, buttonTones.bg),
muted: {
fg: blend(base.bg, tints[200]),
},
Expand Down Expand Up @@ -216,6 +220,7 @@ export function buildColor(
bg,
border: blend(base.bg, tints[500]),
fg: blend(base.bg, buttonTones.bg),
iconColor: blend(base.bg, buttonTones.bg),
muted: {
fg: blend(base.bg, tints[100]),
},
Expand Down Expand Up @@ -255,6 +260,7 @@ export function buildColor(
bg,
border: blend(base.bg, tints[50]),
fg: blend(base.bg, tints[200]),
iconColor: blend(base.bg, tints[200]),
muted: {
fg: blend(bg, tints[100]),
},
Expand Down Expand Up @@ -283,6 +289,7 @@ export function buildColor(
bg,
border: blend(bg, tints[100]),
fg: blend(base.bg, tints[900]),
iconColor: blend(base.bg, tints[900]),
muted: {
fg: blend(base.bg, tints[600]),
},
Expand Down Expand Up @@ -315,6 +322,7 @@ export function buildColor(
bg,
border: blend(bg, tints[100]),
fg: blend(base.bg, tints[800]),
iconColor: blend(base.bg, tints[800]),
muted: {
fg: blend(base.bg, tints[600]),
},
Expand Down Expand Up @@ -347,6 +355,7 @@ export function buildColor(
bg,
border: blend(bg, tints[100]),
fg: blend(bg, tints[800]),
iconColor: blend(bg, tints[800]),
muted: {
fg: blend(bg, tints[600]),
},
Expand Down Expand Up @@ -374,6 +383,7 @@ export function buildColor(
bg,
border: blend(bg, tints[100]),
fg: blend(bg, tints[700]),
iconColor: blend(bg, tints[700]),
muted: {
fg: blend(bg, tints[600]),
},
Expand Down Expand Up @@ -472,6 +482,7 @@ export function buildColor(
return {
bg,
fg: base.fg,
iconColor: base.fg,
border: base.border,
muted: {
fg: blend(base.bg, tints[dark ? 400 : 600]),
Expand Down Expand Up @@ -503,6 +514,7 @@ export function buildColor(

return {
bg: blend(base.bg, tints[50]),
bg2: blend(base.bg, tints[50]),
fg: blend(base.bg, tints[700]),
border: blend(base.bg, tints[200]),
placeholder: blend(base.bg, tints[400]),
Expand All @@ -512,6 +524,7 @@ export function buildColor(
if (state === 'hovered') {
return {
bg: base.bg,
bg2: base.bg,
fg: base.fg,
border: blend(base.bg, hues.gray[300].hex),
placeholder: blend(base.bg, hues.gray[400].hex),
Expand All @@ -521,6 +534,7 @@ export function buildColor(
if (state === 'disabled') {
return {
bg: blend(base.bg, hues.gray[50].hex),
bg2: blend(base.bg, hues.gray[50].hex),
fg: blend(base.bg, hues.gray[200].hex),
border: blend(base.bg, hues.gray[100].hex),
placeholder: blend(base.bg, hues.gray[100].hex),
Expand All @@ -530,6 +544,7 @@ export function buildColor(
if (state === 'readOnly') {
return {
bg: blend(base.bg, hues.gray[50].hex),
bg2: blend(base.bg, hues.gray[50].hex),
fg: blend(base.bg, hues.gray[800].hex),
border: blend(base.bg, hues.gray[200].hex),
placeholder: blend(base.bg, hues.gray[400].hex),
Expand All @@ -538,6 +553,7 @@ export function buildColor(

return {
bg: base.bg,
bg2: base.bg,
fg: base.fg,
border: base.border,
placeholder: blend(base.bg, hues.gray[700].hex),
Expand Down

0 comments on commit d199784

Please sign in to comment.