Skip to content

Commit

Permalink
Update use of color values
Browse files Browse the repository at this point in the history
After rebasing on trunk, previous color values had been retired via #43994 and #43773
  • Loading branch information
aaronrobertshaw committed Sep 23, 2022
1 parent 3f5f8b4 commit 5477fd0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/components/src/slider-control/slider/hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export function useSlider(
min = 0,
size = 'default',
style,
thumbColor = COLORS.admin.theme,
trackColor = COLORS.admin.theme,
thumbColor = COLORS.ui.theme,
trackColor = COLORS.ui.theme,
trackBackgroundColor = CONFIG.controlBackgroundDimColor,
value: valueProp,
...otherProps
Expand Down
10 changes: 4 additions & 6 deletions packages/components/src/slider-control/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,10 @@ export const marks = css`
`;

const markFill = ( { disabled, isFilled }: MarkProps ) => {
let backgroundColor = isFilled
? COLORS.admin.theme
: COLORS.lightGray[ 600 ];
let backgroundColor = isFilled ? COLORS.ui.theme : COLORS.gray[ 300 ];

if ( disabled ) {
backgroundColor = COLORS.lightGray[ 800 ];
backgroundColor = COLORS.gray[ 400 ];
}

return css( { backgroundColor } );
Expand All @@ -225,14 +223,14 @@ export const mark = ( markProps: MarkProps ) => {

const markLabelFill = ( { isFilled }: MarkProps ) => {
return css( {
color: isFilled ? COLORS.darkGray[ 300 ] : COLORS.lightGray[ 600 ],
color: isFilled ? COLORS.gray[ 700 ] : COLORS.gray[ 300 ],
} );
};

export const markLabel = ( markProps: MarkProps ) => {
return css`
box-sizing: border-box;
color: ${ COLORS.lightGray[ 600 ] };
color: ${ COLORS.gray[ 300 ] };
left: 0;
font-size: 11px;
position: absolute;
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/slider-control/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ export type SliderColors = {
/**
* Allows customization of the thumb's color.
*
* @default COLORS.admin.theme
* @default COLORS.ui.theme
*/
thumbColor?: CSSProperties[ 'color' ];
/**
* CSS color string to customize the track elements foreground color. This
* is the portion of the Slider's track representing progress or the actual
* value selected.
*
* @default COLORS.admin.theme
* @default COLORS.ui.theme
*/
trackColor?: CSSProperties[ 'color' ];
/**
Expand Down

0 comments on commit 5477fd0

Please sign in to comment.