Fix calendar rows with theme (#4268)

This commit is contained in:
Jaco Greeff 2020-12-23 20:39:50 +01:00 committed by GitHub
parent 40110844be
commit 2843b98bfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
// Copyright 2017-2020 @polkadot/app-calendar authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { ThemeProps } from '@polkadot/react-components/types';
import type { EntryInfoTyped } from './types';
import React, { useMemo } from 'react';
@ -53,18 +54,14 @@ function DayHour ({ className = '', date, hour, index, minutes, scheduled }: Pro
);
}
export default React.memo(styled(DayHour)`
export default React.memo(styled(DayHour)(({ theme }: ThemeProps) => `
align-items: center;
display: flex;
position: relative;
z-index: 2;
// &:nth-child(even) {
// background: #faf8f6;
// }
&:nth-child(odd) {
background: white;
background: ${theme.bgTable};
}
&.isPast {
@ -95,4 +92,4 @@ export default React.memo(styled(DayHour)`
opacity: 1;
padding: 0.7rem 1rem;
}
`);
`));