/
githubmirror
/
material-ui
Обзор
Документация
Войти
/
githubmirror
/
material-ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
docs/src/components/animation/Slide.tsx
27 строк
654 B
Brijesh Bittu
[code-infra] Remove React import requirement for jsx (#47146)
29 окт 2025, 20:55
Не верифицирован
29 окт 2025, 20:55
6c9e82f
Код
Авторство
О чём код?
import Box, { BoxProps } from '@mui/material/Box'; export default function Slide({ animationName, keyframes, ...props }: BoxProps & { animationName: string; keyframes: Record<string, object> }) { return ( <Box {...props} sx={{ display: 'grid', gridTemplateRows: 'min-content', gap: { xs: 2, sm: 4, md: 8 }, width: 'min-content', animation: `${animationName} 30s ease-out forwards`, '@media (prefers-reduced-motion)': { animation: 'none', }, [`@keyframes ${animationName}`]: { ...keyframes, }, ...props.sx, }} /> ); }