Skip to content

Commit 5ed2479

Browse files
committed
style: customize tab design to override MUI default styles
1 parent 5e19f9b commit 5ed2479

File tree

2 files changed

+3
-24
lines changed

2 files changed

+3
-24
lines changed

src/components/DatasetDetailPage/LoadDatasetTabs.tsx

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const flashcardStyles = {
2626
marginBottom: "0px",
2727
borderRadius: "8px",
2828
borderLeft: `5px solid ${Colors.green}`,
29-
// width: "calc(100% - 8px)", // Two per row, tight spacing
3029
width: "100%",
3130
boxSizing: "border-box" as const,
3231
},
@@ -39,11 +38,9 @@ const flashcardStyles = {
3938
codeBlock: {
4039
display: "block",
4140
background: "#e0e0e0",
42-
// background: Colors.black,
4341
color: Colors.black,
4442
padding: "10px",
4543
borderRadius: "5px",
46-
// fontFamily: "monospace",
4744
whiteSpace: "pre-wrap",
4845
},
4946
};
@@ -80,20 +77,6 @@ const LoadDatasetTabs: React.FC<LoadDatasetTabsProps> = ({
8077
return (
8178
<div role="tabpanel" hidden={value !== index}>
8279
{value === index && <Box sx={{ p: 2 }}>{children}</Box>}
83-
{/* {value === index && (
84-
<Box
85-
sx={{
86-
border: "1px solid #ccc",
87-
borderTop: "none",
88-
borderRadius: "5px 5px 5px 5px",
89-
p: 2,
90-
backgroundColor: "#fff",
91-
borderLeft: `5px solid ${Colors.purple}`,
92-
}}
93-
>
94-
{children}
95-
</Box>
96-
)} */}
9780
</div>
9881
);
9982
};
@@ -109,17 +92,14 @@ const LoadDatasetTabs: React.FC<LoadDatasetTabsProps> = ({
10992
"& .MuiTab-root": {
11093
color: Colors.lightGray, // default color
11194
fontSize: "large",
95+
textTransform: "none",
11296
},
113-
"& .Mui-selected": {
97+
"& .MuiTab-root.Mui-selected": {
11498
color: Colors.green, // active tab color
11599
fontWeight: "bold",
116-
// backgroundColor: Colors.white,
117-
// borderRadius: "5px 5px 0px 0px",
118-
// borderLeft: `5px solid ${Colors.purple}`,
119100
},
120101
"& .MuiTabs-indicator": {
121-
backgroundColor: Colors.green, // underline color
122-
// display: "none",
102+
backgroundColor: Colors.green,
123103
},
124104
}}
125105
>

src/pages/DatasetDetailPage.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import DatasetFlashcards from "../components/DatasetFlashcards";
21
import PreviewModal from "../components/PreviewModal";
32
import CloudDownloadIcon from "@mui/icons-material/CloudDownload";
43
import DescriptionIcon from "@mui/icons-material/Description";

0 commit comments

Comments
 (0)