Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored CurrentHourIndicator component to use the global CSS file (app.module.css) instead of a component-specific CSS file (CurrentHourIndicator.module.css). #3386

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

11 changes: 7 additions & 4 deletions src/components/CurrentHourIndicator/CurrentHourIndicator.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import styles from './CurrentHourIndicator.module.css';
import styles from 'src/style/app.module.css';

/**
* A component that displays an indicator for the current hour.
Expand All @@ -8,9 +8,12 @@ import styles from './CurrentHourIndicator.module.css';
*/
const CurrentHourIndicator = (): JSX.Element => {
return (
<div className={styles.container} data-testid="container">
<div className={styles.round}></div>
<div className={styles.line}></div>
<div
className={styles.currentHourIndicator_container}
data-testid="container"
>
<div className={styles.currentHourIndicator_round}></div>
<div className={styles.currentHourIndicator_line}></div>
</div>
);
};
Expand Down
23 changes: 23 additions & 0 deletions src/style/app.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
/* Red Shades */
--red-delete-bg: #f8d6dc;
--red-delete-text: #ff4d4f;
--red-line-bg: #ff0000;

/* Yellow/Orange Shades */
--loader-color: #febc59;
Expand Down Expand Up @@ -226,6 +227,28 @@
margin-bottom: 3px;
}

.currentHourIndicator_container {
position: relative;
display: flex;
flex-direction: row;
top: -8px;
left: -9px;
}

.currentHourIndicator_round {
background-color: var(--red-line-bg);
border-radius: 100%;
width: 15px;
height: 15px;
}

.currentHourIndicator_line {
width: 100%;
height: 1px;
background-color: var(--red-line-bg);
margin: auto;
}

.sidebar {
z-index: 0;
padding-top: 5px;
Expand Down
Loading