Skip to content
Merged
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
10 changes: 0 additions & 10 deletions packages/view/src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,6 @@ body {
}
}

.folder-activity-flow-button {
padding: 0.5rem 1rem;
background: #007bff;
color: white;
border: none;
border-radius: 0.25rem;
cursor: pointer;
font-size: 0.875rem;
}

.folder-activity-flow-modal {
position: fixed;
top: 0;
Expand Down
15 changes: 9 additions & 6 deletions packages/view/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import type { IDESentEvents } from "types/IDESentEvents";
import { useBranchStore, useDataStore, useGithubInfo, useLoadingStore, useThemeStore } from "store";
import { THEME_INFO } from "components/ThemeSelector/ThemeSelector.const";
import { NetworkGraph } from "components/NetworkGraph";
import { InsightsButton } from "components/InsightsButton";

const App = () => {
const initRef = useRef<boolean>(false);
Expand Down Expand Up @@ -78,13 +79,15 @@ const App = () => {
<BranchSelector />
<div>
<RefreshButton />
<button
type="button"
className="folder-activity-flow-button"
<InsightsButton
isNew
sx={{
width: "1.875rem",
height: "1.875rem",
color: "white",
}}
onClick={handleOpenFolderActivityFlowModal}
>
Folder Activity Flow
</button>
/>
</div>
</div>
<div className="top-container">
Expand Down
26 changes: 26 additions & 0 deletions packages/view/src/components/InsightsButton/InsightsButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { Badge, IconButton, IconButtonProps } from "@mui/material";
import InsightsIcon from "@mui/icons-material/Insights";

type InsightsButtonProps = {
isNew?: boolean;
} & IconButtonProps;

const InsightsButton = ({ isNew = false, ...props }: InsightsButtonProps) => {
Comment thread
Jxxunnn marked this conversation as resolved.
return (
<IconButton {...props}>
<Badge
badgeContent="NEW"
invisible={!isNew}
sx={{
"& .MuiBadge-badge": {
fontSize: "0.625rem",
},
}}
>
Comment thread
Jxxunnn marked this conversation as resolved.
<InsightsIcon />
</Badge>
</IconButton>
);
};

export default InsightsButton;
1 change: 1 addition & 0 deletions packages/view/src/components/InsightsButton/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as InsightsButton } from "./InsightsButton";