React
- 3 ответа
- 0 вопросов
1
Вклад в тег
How To Deploy A React Vite App
ReactDOM.createRoot(document.getElementById('root')).render(
<App />
);
const Button = ({info, id}) => {
const btn = useCallback((id) => {
setTodo(prevTodo => prevTodo.map(item => {
if(item[0] === id) {
return [...item.slice(0,6), !item[6], ...item.slice(7)];
}
return item;
}));
}, []);
return (
<button
className={`icon ${info ? 'icon-play' : 'icon-pause'}`}
onClick={() => btn(id)}
/>
);
}
const HomeText = (props) => (
<Typography
variant='h1'
component="h2"
sx={{
color: "white",
fontWeight: "bolder",
maxWidth: {
xs: "95%", // для мобильных
sm: "85%", // для планшетов
md: "80%" // для десктопов
},
wordWrap: "break-word"
}}
>
{props.children}
</Typography>
)