scroll in ServiceList
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import Box from '@mui/material/Box';
|
||||||
import {Grid, Paper, Link, Typography} from '@mui/material';
|
import {Grid, Paper, Link, Typography} from '@mui/material';
|
||||||
|
|
||||||
interface ServiceList {
|
interface ServiceList {
|
||||||
@@ -14,6 +15,12 @@ interface ServiceListProps {
|
|||||||
|
|
||||||
const ServiceList: React.FC<ServiceListProps> = ({serviceList}) => {
|
const ServiceList: React.FC<ServiceListProps> = ({serviceList}) => {
|
||||||
return (
|
return (
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
flex: 1,
|
||||||
|
overflowY: 'auto', // ✅ Scroll only inside this
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Grid container spacing={3} justifyContent="center">
|
<Grid container spacing={3} justifyContent="center">
|
||||||
{serviceList.map((s) => (
|
{serviceList.map((s) => (
|
||||||
<Paper
|
<Paper
|
||||||
@@ -35,6 +42,7 @@ const ServiceList: React.FC<ServiceListProps> = ({serviceList}) => {
|
|||||||
</Paper>
|
</Paper>
|
||||||
))}
|
))}
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</Box>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user