mirror of
https://github.com/r-freeman/portfolio.git
synced 2024-11-11 18:45:41 +00:00
Converted section and uses to ts
This commit is contained in:
parent
f039c1aa40
commit
aa194f011a
@ -1,6 +1,6 @@
|
|||||||
import { useId } from 'react'
|
import {ReactNode, useId} from 'react'
|
||||||
|
|
||||||
export function Section({ title, children }) {
|
export function Section({title, children}: { title: string, children: ReactNode }) {
|
||||||
let id = useId()
|
let id = useId()
|
||||||
|
|
||||||
return (
|
return (
|
@ -3,10 +3,11 @@ import Head from 'next/head'
|
|||||||
import {Card} from '@/components/ui/Card'
|
import {Card} from '@/components/ui/Card'
|
||||||
import {Section} from '@/components/ui/Section'
|
import {Section} from '@/components/ui/Section'
|
||||||
import {SimpleLayout} from '@/components/layouts/SimpleLayout'
|
import {SimpleLayout} from '@/components/layouts/SimpleLayout'
|
||||||
|
import {ReactNode} from 'react'
|
||||||
|
|
||||||
function ToolsSection({children, ...props}) {
|
function ToolsSection({children, title}: { children: ReactNode, title: string }) {
|
||||||
return (
|
return (
|
||||||
<Section {...props}>
|
<Section title={title}>
|
||||||
<ul role="list" className="space-y-16">
|
<ul role="list" className="space-y-16">
|
||||||
{children}
|
{children}
|
||||||
</ul>
|
</ul>
|
||||||
@ -14,7 +15,7 @@ function ToolsSection({children, ...props}) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function Tool({title, href, children}) {
|
function Tool({title, href, children}: { title: string, href: string, children: ReactNode }) {
|
||||||
return (
|
return (
|
||||||
<Card as="li">
|
<Card as="li">
|
||||||
<Card.Title as="h3" href={href}>
|
<Card.Title as="h3" href={href}>
|
Loading…
Reference in New Issue
Block a user