Skip to content

Commit

Permalink
fix(ui-pagination): fix color of pageInput's label
Browse files Browse the repository at this point in the history
Closes: INSTUI-4385

it was unset, so its color was derived from a parent, now its set to our default text color
TEST PLAN:
check the color in devtools
  • Loading branch information
matyasf committed Dec 12, 2024
1 parent 7be2226 commit b91cfe1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/shared-types/src/ComponentThemeVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,7 @@ export type PagesTheme = {
export type PaginationPageInputTheme = {
inputSpacing: Spacing['xSmall']
inputWidth: string
labelColor: Colors['contrasts']['grey125125']
}

export type PaginationTheme = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ const generateStyle = (
inputLabel: {
label: 'paginationPageInput__inputLabel',
marginInlineStart: componentTheme.inputSpacing,
whiteSpace: 'nowrap'
whiteSpace: 'nowrap',
color: componentTheme.labelColor
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ import type { PaginationPageInputTheme } from '@instructure/shared-types'
* @return {Object} The final theme object with the overrides and component variables
*/
const generateComponentTheme = (theme: Theme): PaginationPageInputTheme => {
const { spacing } = theme
const { spacing, colors } = theme

const componentVariables: PaginationPageInputTheme = {
inputSpacing: spacing.xSmall,
inputWidth: '4.5rem'
inputWidth: '4.5rem',
labelColor: colors?.contrasts?.grey125125
}

return {
Expand Down

0 comments on commit b91cfe1

Please sign in to comment.