Skip to content

Commit

Permalink
feat(LogViewer): add loading text
Browse files Browse the repository at this point in the history
  • Loading branch information
Carrotzpc committed Aug 5, 2024
1 parent e55dfab commit 9eab5b2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/LogViewer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ export const LogViewer: React.FC<LogViewerProps> = ({
)}
startFollowing
/>
{loading && <Icon className={styles.loader} icon={LoaderCircle} spin />}
{loading && (
<>
<div className={styles.loaderText}>loading ...</div>
<Icon className={styles.loaderIcon} icon={LoaderCircle} spin />
</>
)}
</div>
);
};
12 changes: 11 additions & 1 deletion src/LogViewer/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,23 @@ export const useStyles = createStyles(
}
.log-content {
margin-left: 15px;
font-family: ${token.fontFamilyCode};
}
}
`,
searchBarIcon: css`
font-size: 16px;
`,
loader: css`
loaderText: css`
position: absolute;
top: 44px;
left: 15px;
font-family: ${token.fontFamilyCode};
font-size: 12px;
color: #fff;
`,
loaderIcon: css`
position: absolute;
right: ${token.marginSM}px;
bottom: ${token.marginSM}px;
Expand Down

0 comments on commit 9eab5b2

Please sign in to comment.