{items.map(({ icon, title, description }, index) => (
handleItemClick(index)}
sx={[
(theme) => ({
p: 2,
height: '100%',
width: '100%',
'&:hover': {
backgroundColor: (theme.vars || theme).palette.action.hover,
},
}),
selectedItemIndex === index && {
backgroundColor: 'action.selected',
},
]}
>
{icon}
{title}
{description}
))}
({
m: 'auto',
width: 420,
height: 500,
backgroundSize: 'contain',
backgroundImage: 'var(--items-imageLight)',
...theme.applyStyles('dark', {
backgroundImage: 'var(--items-imageDark)',
}),
})}
style={
items[selectedItemIndex]
? ({
'--items-imageLight': items[selectedItemIndex].imageLight,
'--items-imageDark': items[selectedItemIndex].imageDark,
} as any)
: {}
}
/>