Skip to content

Commit

Permalink
Fix color inconsistencies in components (#1614)
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-baer committed Jun 14, 2022
1 parent df21962 commit 2ac245b
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changeset/few-birds-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sumup/circuit-ui': patch
---

Replaced `colors.n900` with `colors.bodyColor` when used as a text color for consistency.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import calendarInheritStyles from './CalendarImportedStyles';
const dayDefault = (theme) => css`
.CalendarDay__default {
border: 1px solid ${theme.colors.n300};
color: ${theme.colors.n900};
color: ${theme.colors.bodyColor};
background: ${theme.colors.white};
vertical-align: middle;
Expand Down Expand Up @@ -131,7 +131,7 @@ const dateRangePickerInput = (theme) => css`
}
.DateInput_input {
color: ${theme.colors.n900};
color: ${theme.colors.bodyColor};
${typography('one')(theme)};
font-weight: 200;
background-color: inherit;
Expand Down Expand Up @@ -210,7 +210,7 @@ const closeButton = (theme) => css`

const calendarCaption = (theme) => css`
.CalendarMonth_caption {
color: ${theme.colors.n900};
color: ${theme.colors.bodyColor};
font-size: 18px;
text-align: center;
padding-top: 22px;
Expand All @@ -221,7 +221,7 @@ const calendarCaption = (theme) => css`

const calendarWeekHeader = (theme) => css`
.DayPicker_weekHeader {
color: ${theme.colors.n900};
color: ${theme.colors.bodyColor};
position: absolute;
top: 67px;
z-index: 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const buttonBase = ({ theme, primary }) => css`
${typography('two')(theme)};
margin-left: ${theme.spacings.kilo}};
cursor: pointer;
color: ${primary ? theme.colors.b500 : theme.colors.n900};
color: ${primary ? theme.colors.p500 : theme.colors.bodyColor};
`;

const InfoButton = styled('span')(buttonBase);
Expand Down
4 changes: 2 additions & 2 deletions packages/circuit-ui/components/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
}

const containerBaseStyles = ({ theme }: StyleProps) => css`
color: ${theme.colors.n900};
color: ${theme.colors.bodyColor};
display: block;
position: relative;
`;
Expand Down Expand Up @@ -187,7 +187,7 @@ const selectBaseStyles = ({ theme }: StyleProps) => css`
border: 0;
border-radius: ${theme.borderRadius.byte};
box-shadow: none;
color: ${theme.colors.n900};
color: ${theme.colors.bodyColor};
margin: 0;
padding-top: ${theme.spacings.kilo};
padding-right: ${theme.spacings.exa};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const sortableStyles = ({ theme, sortable }: StyleProps & ThElProps) =>
&:focus-within,
&:hover {
background-color: ${theme.colors.n100};
color: ${theme.colors.b500};
color: ${theme.colors.p500};
& > button {
opacity: 1;
Expand Down
2 changes: 1 addition & 1 deletion packages/circuit-ui/components/Tabs/components/Tab/Tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const selectedTabStyles = ({ theme, selected }) =>
selected &&
css`
position: relative;
color: ${theme.colors.n900};
color: ${theme.colors.bodyColor};
&::after {
content: ' ';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const warningStyles = ({
}: StyleProps & ValidationHintProps) =>
hasWarning &&
css`
color: ${theme.colors.n900};
color: ${theme.colors.bodyColor};
`;

const invalidStyles = ({ theme, invalid }: StyleProps & ValidationHintProps) =>
Expand Down

1 comment on commit 2ac245b

@vercel
Copy link

@vercel vercel bot commented on 2ac245b Jun 14, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.