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

Styling connection modal #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
58 changes: 49 additions & 9 deletions src/renderer/modals/ConnectionConfigModal.css
Original file line number Diff line number Diff line change
@@ -1,26 +1,66 @@
.ConnectionConfigModal-content {
font-family: Arial, sans-serif;
padding: 24px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.ConnectionConfigModal-config-field {

.ConnectionConfigModal-config-field:first-child {
display: block;
padding: 2px 0 2px;
font-weight: bold;
margin-bottom: 10px;
color: var(--window-head-color);
}

.ConnectionConfigModal-section .ConnectionConfigModal-config-field {
padding-left: 12px;
padding-left: 0;
}

.ConnectionConfigModal-config-field input {
margin-left: 4px;
border: none;
border-bottom: 1px solid var(--window-accent-color);
min-width: 200px;
display: block;
margin-top: 5px;
padding: 10px;
border: 1px solid var(--window-accent-color);
border-radius: 5px;
outline: none;
font-size: 16px;
transition: border-color 0.3s ease;
}
.ConnectionConfigModal-config-field input:focus{

.ConnectionConfigModal-config-field input:focus {
border-color: var(--window-head-color);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.ConnectionConfigModal-config-field-2 {
display: block;
margin-top: 10px;
}

.ConnectionConfigModal-section input {
font-size: 14px;
}

.ConnectionConfigModal-section .ConnectionConfigModal-config-field {
font-size: 14px;
}

.ConnectionConfigModal-section .ConnectionConfigModal-config-field::before {
content: '•';
color: #000;
margin-right: 8px;
}

.ConnectionConfigModal-section:not(:first-child) {
margin-top: 8px;
margin-top: 15px;
}

.ConnectionConfigModal-section-header {
padding: 4px 0 4px 0;
padding: 10px 0;
font-weight: bold;
border-bottom: 1px solid #ddd;
margin-bottom: 10px;
color: var(--window-head-color);
}
2 changes: 1 addition & 1 deletion src/renderer/modals/ConnectionConfigModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default function ConnectionConfigModal({
</label>
<label
htmlFor="ConnectionConfigModal-FieldStationNum"
className="ConnectionConfigModal-config-field"
className="ConnectionConfigModal-config-field ConnectionConfigModal-config-field-2"
>
Field Control Station Number:
<input
Expand Down
28 changes: 19 additions & 9 deletions src/renderer/modals/Modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,44 @@
background-color: var(--body-color);
border-radius: 10px;
font-family: Arial, sans-serif;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
z-index: 1000;
}

.Modal-active {
display: block;
}

.Modal-title-bar {
white-space: nowrap;
padding: 10px 10px 10px 20px;
padding: 4px 18px;
background-color: var(--window-head-color);
border-radius: 10px 10px 0 0;
color: var(--window-head-text-color);
font-family: Tahoma, sans-serif;
height: 40px;
margin: auto 0 auto 0;
height: 50px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}

.Modal-title {
font-size: 16px;
font-weight: bold;
}

.Modal-close-button {
position: absolute;
right: 10px;
margin-top: 2px;
margin-left: auto;
background-color: transparent;
border: none;
color: var(--window-head-text-color);
font-weight: bold;
cursor: pointer;
width: 40px;
height: 40px;
font-size: 22px;
}

.Modal-content {
padding: 20px;
max-height: 400px;
overflow-y: auto;
}
2 changes: 1 addition & 1 deletion src/renderer/modals/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function Modal({
<div className="Modal-title-bar">
<span className="Modal-title">{modalTitle}</span>
<button className="Modal-close-button" onClick={onClose} type="button">
X
&times;
</button>
</div>
<div className={`Modal-content ${className}`}>{children}</div>
Expand Down