Skip to content

Commit 42972ff

Browse files
committed
feat: add scrollable buttons to code blocks on mobile screen size
1 parent 166f4a2 commit 42972ff

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/components/DatasetDetailPage/LoadDatasetTabs.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ const LoadDatasetTabs: React.FC<LoadDatasetTabsProps> = ({
173173
onChange={handleTabChange}
174174
variant="scrollable"
175175
scrollButtons="auto"
176+
allowScrollButtonsMobile
176177
sx={{
177178
"& .MuiTab-root": {
178179
color: Colors.lightGray, // default color
@@ -186,6 +187,12 @@ const LoadDatasetTabs: React.FC<LoadDatasetTabsProps> = ({
186187
"& .MuiTabs-indicator": {
187188
backgroundColor: Colors.green,
188189
},
190+
"& .MuiTabs-scrollButtons": {
191+
color: Colors.lightGray, // scroll buttons color
192+
},
193+
"& .MuiTabs-scrollButtons.Mui-disabled": {
194+
opacity: 0.3, // darker when button disabled
195+
},
189196
}}
190197
>
191198
<Tab label="Python (REST API)" />

0 commit comments

Comments
 (0)