feat: link and directory improvements
Changing pages now happens via Link, directory has gotten a layout change with app becoming a starting point and every page requireing their own .tsx and .css file. Components have also been added where reocurring componennts can be made and reapplied in the project. ref: N25B-96
This commit is contained in:
4
src/pages/TemplatePage/Template.module.css
Normal file
4
src/pages/TemplatePage/Template.module.css
Normal file
@@ -0,0 +1,4 @@
|
||||
button.reset:hover {
|
||||
background-color: yellow;
|
||||
}
|
||||
|
||||
24
src/pages/TemplatePage/Template.tsx
Normal file
24
src/pages/TemplatePage/Template.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import { useState } from 'react'
|
||||
import { Link } from 'react-router'
|
||||
import Counter from '../../components/components.tsx'
|
||||
import style from './Template.module.css'
|
||||
|
||||
//this is your css file where you can style your buttons and such
|
||||
//you can still use css parts from App.css, but also overwrite them
|
||||
|
||||
function TemplatePage() {
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<Counter />
|
||||
<Link to = {"/"}> {/* here you link to the homepage, in App.tsx you can link new pages */}
|
||||
<button className= 'movePage left' onClick={() :void => {}}>
|
||||
Page {'<'}-- Go Home
|
||||
</button>
|
||||
</Link>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default TemplatePage
|
||||
Reference in New Issue
Block a user