Fix Dark Mode Colors (#1099)

- fix dark mode colors
This commit is contained in:
brendanlaschke 2023-08-07 19:08:02 +02:00 committed by GitHub
parent de6ebd96c5
commit 029ba25361
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 30 additions and 3 deletions

View File

@ -35,6 +35,7 @@ const StyledTaskBody = styled.div`
`; `;
const StyledTaskTitle = styled.div` const StyledTaskTitle = styled.div`
color: ${({ theme }) => theme.font.color.primary};
font-weight: ${({ theme }) => theme.font.weight.medium}; font-weight: ${({ theme }) => theme.font.weight.medium};
padding: 0 ${({ theme }) => theme.spacing(2)}; padding: 0 ${({ theme }) => theme.spacing(2)};
`; `;

View File

@ -13,6 +13,7 @@ type OwnProps = {
const StyledContainer = styled.div` const StyledContainer = styled.div`
align-items: center; align-items: center;
border-top: 1px solid ${({ theme }) => theme.border.color.medium}; border-top: 1px solid ${({ theme }) => theme.border.color.medium};
color: ${({ theme }) => theme.font.color.primary};
display: flex; display: flex;
flex-direction: row; flex-direction: row;
gap: ${({ theme }) => theme.spacing(2)}; gap: ${({ theme }) => theme.spacing(2)};

View File

@ -10,6 +10,7 @@ export type StyledCalendarContainerProps = {
}; };
const StyledInputContainer = styled.div` const StyledInputContainer = styled.div`
color: ${({ theme }) => theme.font.color.primary};
display: flex; display: flex;
padding: ${({ theme }) => theme.spacing(2)}; padding: ${({ theme }) => theme.spacing(2)};

View File

@ -48,6 +48,7 @@ const StyledContainer = styled.div`
& .react-datepicker__header__dropdown { & .react-datepicker__header__dropdown {
display: flex; display: flex;
color: ${({ theme }) => theme.font.color.primary};
margin-left: ${({ theme }) => theme.spacing(1)}; margin-left: ${({ theme }) => theme.spacing(1)};
margin-bottom: ${({ theme }) => theme.spacing(1)}; margin-bottom: ${({ theme }) => theme.spacing(1)};
} }

View File

@ -6,7 +6,11 @@ import debounce from 'lodash.debounce';
import { Button, ButtonVariant } from '@/ui/button/components/Button'; import { Button, ButtonVariant } from '@/ui/button/components/Button';
import { TextInput } from '@/ui/input/text/components/TextInput'; import { TextInput } from '@/ui/input/text/components/TextInput';
import { Modal } from '@/ui/modal/components/Modal'; import { Modal } from '@/ui/modal/components/Modal';
import { Section, SectionAlignment } from '@/ui/section/components/Section'; import {
Section,
SectionAlignment,
SectionFontColor,
} from '@/ui/section/components/Section';
import { H1Title, H1TitleFontColor } from '@/ui/typography/components/H1Title'; import { H1Title, H1TitleFontColor } from '@/ui/typography/components/H1Title';
interface ConfirmationModalProps { interface ConfirmationModalProps {
@ -73,7 +77,12 @@ export function ConfirmationModal({
}} }}
> >
<H1Title title={title} fontColor={H1TitleFontColor.Primary} /> <H1Title title={title} fontColor={H1TitleFontColor.Primary} />
<Section alignment={SectionAlignment.Center}>{subtitle}</Section> <Section
alignment={SectionAlignment.Center}
fontColor={SectionFontColor.Primary}
>
{subtitle}
</Section>
{confirmationValue && ( {confirmationValue && (
<Section> <Section>
<TextInput <TextInput

View File

@ -5,6 +5,7 @@ type OwnProps = {
children: ReactNode; children: ReactNode;
alignment?: SectionAlignment; alignment?: SectionAlignment;
fullWidth?: boolean; fullWidth?: boolean;
fontColor?: SectionFontColor;
}; };
export enum SectionAlignment { export enum SectionAlignment {
@ -12,10 +13,18 @@ export enum SectionAlignment {
Center = 'center', Center = 'center',
} }
export enum SectionFontColor {
Primary = 'primary',
Secondary = 'secondary',
Tertiary = 'tertiary',
}
const StyledSection = styled.div<{ const StyledSection = styled.div<{
alignment: SectionAlignment; alignment: SectionAlignment;
fullWidth: boolean; fullWidth: boolean;
fontColor: SectionFontColor;
}>` }>`
color: ${({ theme, fontColor }) => theme.font.color[fontColor]};
margin-bottom: ${({ theme }) => theme.spacing(4)}; margin-bottom: ${({ theme }) => theme.spacing(4)};
margin-top: ${({ theme }) => theme.spacing(4)}; margin-top: ${({ theme }) => theme.spacing(4)};
text-align: ${({ alignment }) => alignment}; text-align: ${({ alignment }) => alignment};
@ -26,9 +35,14 @@ export function Section({
children, children,
alignment = SectionAlignment.Left, alignment = SectionAlignment.Left,
fullWidth = true, fullWidth = true,
fontColor = SectionFontColor.Primary,
}: OwnProps) { }: OwnProps) {
return ( return (
<StyledSection alignment={alignment} fullWidth={fullWidth}> <StyledSection
alignment={alignment}
fullWidth={fullWidth}
fontColor={fontColor}
>
{children} {children}
</StyledSection> </StyledSection>
); );