Skip to content

Commit

Permalink
fix: acertos de layout
Browse files Browse the repository at this point in the history
  • Loading branch information
erikfig committed Sep 11, 2024
1 parent a220018 commit 3fe5ff1
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const Menu = ({ menus }: MenuProps) => {
const location = useLocation()

const menuItem = 'py-4 px-4 block hover:bg-grey hover:dark:bg-neutral-700 hover:no-underline transition-all duration-500'
const menuActive = 'py-4 px-4 block bg-primary hover:no-underline transition-all duration-500'
const menuActive = 'text-white py-4 px-4 block bg-primary hover:no-underline transition-all duration-500'

useEffect(() => {
RoutesConfig.find((route) => {
Expand Down
5 changes: 3 additions & 2 deletions src/config/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { DefaultLayout } from '@layouts/default/default.layout'
import { RouteObject } from 'react-router-dom'
import { Home } from '../pages/home'
import { ReactNode } from 'react'
import { NoTemplate } from '@pages/no-template'

type RouteConfigItemProps = {
title?: ReactNode,
Expand All @@ -22,7 +23,7 @@ export const RoutesConfig: RouteConfigItem[] = [
path: '/',
home: true,
props: {
title: <><span className="material-symbols-outlined">home</span> Titulo h1</>,
title: <><span className="material-symbols-outlined">home</span> Dashboard Home Page</>,
menuLabel: 'Home',
menuIcon: 'home',
},
Expand Down Expand Up @@ -55,7 +56,7 @@ export const RoutesConfig: RouteConfigItem[] = [
menuLabel: 'Sem Template',
menuIcon: 'check_box_outline_blank',
},
element: <>Sem Template</>,
element: <NoTemplate />,
},
{
props: {
Expand Down
2 changes: 1 addition & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ createRoot(document.getElementById('root')!).render(
<App />
</DarkModeProvider>
</QueryClientProvider>
</StrictMode>,
</StrictMode>
)
4 changes: 2 additions & 2 deletions src/pages/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ export const Home = () => {

<div className="grid grid-cols-12">
<Card className="col-span-4">
<Typography type='h3'>Titulo h3</Typography>
<Typography type='h3'>Radial Chart</Typography>
<Radial />
</Card>

<Card className="col-span-8">
<Typography type='h3'>Titulo h3</Typography>
<Typography type='h3'>Column Chart</Typography>
<Bar />
</Card>
</div>
Expand Down
38 changes: 38 additions & 0 deletions src/pages/no-template.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { useNavigate } from 'react-router-dom'
import { Button } from '../components/button'
import { Typography } from '../components/Typography'

export const NoTemplate = () => {
const navigate = useNavigate()
const handleBack = () => navigate('/')

return (
<div className="p-8">
<Typography type="h1">
Lorem ipsum dolor sit amet
</Typography>

<Typography>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ut viverra massa, sit amet pulvinar sapien. Aenean porttitor et orci id tincidunt. Nullam erat ligula, suscipit vel condimentum consectetur, vehicula id lectus. Maecenas aliquet et sapien eget vehicula. Praesent vitae placerat felis, at facilisis orci. In sit amet vestibulum nisl. Quisque sodales facilisis sem eu venenatis.
</Typography>

<Typography>
Morbi vestibulum volutpat purus vitae molestie. Aliquam non risus in metus porttitor feugiat non vitae tortor. Morbi vulputate aliquam turpis, laoreet iaculis felis porta varius. Donec et tellus dolor. Morbi facilisis dolor at felis scelerisque dapibus. Vestibulum tristique vestibulum orci. Aliquam ante purus, porttitor et risus porttitor, mattis vehicula nisl. Pellentesque lobortis fermentum pellentesque. Aliquam erat volutpat. Nulla facilisi. Pellentesque vestibulum dui ac vulputate bibendum.
</Typography>

<Typography>
In faucibus lorem vitae lacus vestibulum, et viverra massa blandit. Pellentesque pharetra vulputate congue. Donec a blandit mauris. Maecenas vulputate euismod diam, quis dignissim nunc elementum eu. Praesent porta aliquet est, quis volutpat justo sodales id. In hac habitasse platea dictumst. Mauris pulvinar tellus semper porta rhoncus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
</Typography>

<Typography>
Quisque congue dictum massa, ullamcorper fermentum nulla vulputate eget. Vivamus ultricies pulvinar nulla vitae pulvinar. Maecenas mattis tincidunt elit, quis dignissim justo euismod vel. Quisque volutpat neque nec sem gravida aliquet. Curabitur aliquet bibendum purus at bibendum. Maecenas at dapibus elit. In vel elit in lacus auctor rutrum nec ac justo. Pellentesque diam odio, convallis quis iaculis eu, sodales non nibh. Phasellus id convallis urna.
</Typography>

<Typography>
Nam mattis pulvinar arcu. Nulla ex nibh, varius nec lobortis a, dictum ac massa. Vestibulum diam lacus, ultricies et massa sed, sodales molestie urna. Duis turpis turpis, mattis et dictum vitae, eleifend quis sapien. Donec maximus tristique mi vitae commodo. Nulla laoreet consequat purus. In aliquet gravida velit, id fermentum tellus dignissim eget. Maecenas a velit eget lorem dapibus pretium. Nullam eu sapien pharetra, luctus augue eu, auctor purus. Integer non purus sapien. Sed malesuada orci velit, vel pulvinar tellus rhoncus vel. Nam non tincidunt sem, in luctus elit. Donec suscipit ex ultricies nulla scelerisque, nec eleifend augue vestibulum. Duis imperdiet convallis sollicitudin.
</Typography>

<Button onClick={handleBack}>Voltar</Button>
</div>
)
}

0 comments on commit 3fe5ff1

Please sign in to comment.