-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: global pass to improve stylings.
- Loading branch information
1 parent
4514907
commit 14d7280
Showing
25 changed files
with
899 additions
and
383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.objectBar { | ||
display: grid; | ||
grid-template-columns: repeat(4, 1fr); | ||
|
||
& button { | ||
width: 100%; | ||
white-space: nowrap; | ||
} | ||
|
||
& button:not(:hover, :focus) { | ||
border-color: transparent; | ||
background-color: transparent; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,39 @@ | ||
import React from "react"; | ||
import styles from "./ObjectButtonBar.module.css"; | ||
|
||
import { useEditorContext } from "../../context/EditorContext"; | ||
import ObjectPreviewButton from "./ObjectPreviewButton"; | ||
import ObjectStatus from "./ObjectStatus"; | ||
import Refresh from "@mui/icons-material/Refresh"; | ||
import EditParentsButton from "./EditParentsButton"; | ||
import DeleteObjectButton from "./DeleteObjectButton"; | ||
|
||
import RefreshIcon from "@mui/icons-material/Refresh"; | ||
|
||
export interface ObjectButtonBarProps { | ||
pid: string; | ||
pid: string; | ||
} | ||
|
||
const ObjectButtonBar = ({ pid }: ObjectButtonBarProps): React.ReactElement => { | ||
const { | ||
action: { clearPidFromChildListStorage }, | ||
} = useEditorContext(); | ||
const { | ||
action: { clearPidFromChildListStorage }, | ||
} = useEditorContext(); | ||
|
||
return ( | ||
<> | ||
<ObjectStatus pid={pid} /> | ||
<EditParentsButton pid={pid} /> | ||
<button onClick={() => clearPidFromChildListStorage(pid)}> | ||
<Refresh style={{ height: "14px" }} titleAccess="Refresh children" /> | ||
</button> | ||
<ObjectPreviewButton pid={pid} /> | ||
<DeleteObjectButton pid={pid} /> | ||
</> | ||
); | ||
return ( | ||
<div className={styles.objectBar}> | ||
<ObjectStatus pid={pid} /> | ||
<EditParentsButton pid={pid} /> | ||
<button | ||
type="button" | ||
className={styles.refreshBtn} | ||
onClick={() => clearPidFromChildListStorage(pid)} | ||
title="Refresh children" | ||
> | ||
<RefreshIcon /> Refresh | ||
</button> | ||
<ObjectPreviewButton pid={pid} /> | ||
<DeleteObjectButton pid={pid} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ObjectButtonBar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,27 @@ | ||
.active .indicator { | ||
color: green; | ||
color: var(--object-status-active); | ||
} | ||
.active:is(:hover, :focus) .indicator { | ||
color: var(--object-status-active-hover); | ||
} | ||
|
||
.inactive .indicator { | ||
color: yellow; | ||
color: var(--object-status-inactive); | ||
} | ||
.inactive:is(:hover, :focus) .indicator { | ||
color: var(--object-status-inactive-hover); | ||
} | ||
|
||
.deleted .indicator { | ||
color: red; | ||
color: var(--object-status-deleted); | ||
} | ||
.deleted:is(:hover, :focus) .indicator { | ||
color: var(--object-status-deleted-hover); | ||
} | ||
|
||
.unknown .indicator { | ||
color: gray; | ||
color: var(--object-status-unknown); | ||
} | ||
|
||
.indicator { | ||
text-shadow: -1px 1px 0 #000, 1px 1px 0 #000, 1px -1px 0 #000, -1px -1px 0 #000; | ||
.unknown:is(:hover, :focus) .indicator { | ||
color: var(--object-status-unknown-hover); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,53 @@ | ||
.childlist { | ||
padding-inline: 1rem; | ||
padding-block: 1px; | ||
background-color: var(--panel); | ||
} | ||
|
||
.childlist__list { | ||
margin-block: 0; | ||
padding-inline: 0; | ||
list-style-type: none; | ||
} | ||
.childlist__list > li { | ||
margin-block: 0; | ||
border-block-start: 1px solid var(--border); | ||
} | ||
|
||
.childlist__item { | ||
margin-block: 0; | ||
padding-block: 0.25rem; | ||
} | ||
|
||
.childlist__expandicon { | ||
font-size: 1.5em; | ||
vertical-align: bottom; | ||
cursor: pointer; | ||
|
||
&:hover, | ||
&:focus { | ||
color: var(--active); | ||
} | ||
} | ||
|
||
.childlist li { | ||
border-top: 1px solid gray; | ||
.childlist__pid { | ||
font-family: var(--family-monospace); | ||
text-align: end; | ||
color: var(--text-muted); | ||
} | ||
|
||
/* Nested */ | ||
|
||
.childlist__list .childlist { | ||
margin-inline-start: 1rem; | ||
padding-inline-end: 0; | ||
} | ||
|
||
/* Pagination alignment */ | ||
|
||
.childlist .pagination { | ||
margin-block-end: 1px; | ||
} | ||
.childlist .pagination li { | ||
margin: 0; | ||
} |
Oops, something went wrong.