Skip to content

Commit

Permalink
1020 modify extractor description UI (#1048)
Browse files Browse the repository at this point in the history
* UI changes for Extractor Modal and Extractor Page

* Update ListenerItem.tsx
  • Loading branch information
Vismayak authored May 14, 2024
1 parent 3b2027b commit c847780
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
16 changes: 12 additions & 4 deletions frontend/src/components/listeners/ListenerInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ type ListenerInfoProps = {
defaultExpanded?: boolean;
};

const customStyles = {
authorInfo: {
color: theme.palette.info.main,
fontSize: "12px",
margin: "0.75em 0 0.75em 0",
},
};

export const ListenerInfo = (props: ListenerInfoProps) => {
const { selectedExtractor, defaultExpanded } = props;

Expand All @@ -32,19 +40,19 @@ export const ListenerInfo = (props: ListenerInfoProps) => {
<></>
)}
</Box>
{selectedExtractor && selectedExtractor["description"] ? (
<Typography>{selectedExtractor["description"]}</Typography>
) : null}
{selectedExtractor &&
selectedExtractor["created"] &&
selectedExtractor["properties"] &&
selectedExtractor["properties"]["author"] ? (
<ClowderFootnote style={{ color: theme.palette.info.main }}>
<ClowderFootnote style={customStyles.authorInfo}>
{`Created by ${
selectedExtractor["properties"]["author"]
} at ${parseDate(selectedExtractor["created"])}`}
</ClowderFootnote>
) : null}
{selectedExtractor && selectedExtractor["description"] ? (
<Typography>{selectedExtractor["description"]}</Typography>
) : null}
{selectedExtractor ? (
<ListenerInfoDetails
listener={selectedExtractor}
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/listeners/ListenerItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function ListenerItem(props: ListenerCardProps) {
!extractor["alive"] ? (
<Typography
sx={{
padding: "0.5em",
padding: "2em",
color: "rgba(0, 0, 0, 0.26)",
fontSize: "14px",
}}
Expand All @@ -74,8 +74,8 @@ export default function ListenerItem(props: ListenerCardProps) {
) : (
<Typography
sx={{
padding: "0.5em",
color: theme.palette.primary.light,
padding: "2em",
color: theme.palette.info.main,
fontSize: "14px",
}}
>
Expand Down

0 comments on commit c847780

Please sign in to comment.