AnimationRoutes
AnimationRoutes component: Wrapper thay thế cho Routes của react-router, component này thêm hiệu ứng khi chuyển trang
Properties
AnimationRoutes
Name | Type | Default | Description |
---|---|---|---|
children | React.ReactNode | C ác |
Example
import React from "react"; import { Page, Text, Box, Button, useNavigate } from "zmp-ui"; export default function HomePage(props) { const navigate = useNavigate(); return ( <Page className="section-container"> <Text.Title style={{ textAlign: "center" }}>Home Page</Text.Title> <Box mt={6}> <Button fullWidth variant="secondary" onClick={() => { navigate("/page1"); }} > Go To Page 1 </Button> </Box> </Page> ); }