#49 ぼちぼち
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import React, { useState } from 'react'
|
||||
import { cn } from '@/lib/utils'
|
||||
|
||||
type TabProps = { name: string
|
||||
init?: boolean
|
||||
@@ -6,7 +7,7 @@ type TabProps = { name: string
|
||||
|
||||
type Props = { children: React.ReactElement<{ name: string }>[] }
|
||||
|
||||
export const Tab = ({ children }: TabProps) => children
|
||||
export const Tab = ({ children }: TabProps) => <>{children}</>
|
||||
|
||||
|
||||
export default ({ children }: Props) => {
|
||||
@@ -23,7 +24,7 @@ export default ({ children }: Props) => {
|
||||
{tabs.map ((tab, i) => (
|
||||
<a key={i}
|
||||
href="#"
|
||||
className={`text-blue-400 hover:underline ${ i === current ? 'font-bold' : '' }`}
|
||||
className={cn (i === current && 'font-bold')}
|
||||
onClick={ev => {
|
||||
ev.preventDefault ()
|
||||
setCurrent (i)
|
||||
|
||||
Reference in New Issue
Block a user