Update various components

This commit is contained in:
2026-02-26 21:03:21 -05:00
parent 637b3a0c34
commit 94f0f3ca13
20 changed files with 84 additions and 112 deletions

View File

@@ -3,12 +3,9 @@ import { Tab } from "@headlessui/react";
import clsx from "clsx";
export default function MattrixwvTab(props: MattrixwvTabProps){
const {
children
} = props;
export default function MattrixwvTab({
children
}: Readonly<MattrixwvTabProps>){
return (
<Tab
className={clsx(

View File

@@ -7,13 +7,10 @@ import MattrixwvTabPanel from "./MattrixwvTabPanel";
import MattrixwvTabPanels from "./MattrixwvTabPanels";
export default function MattrixwvTabGroup(props: MattrixwvTabGroupProps){
const {
tabs,
className
} = props;
export default function MattrixwvTabGroup({
tabs,
className
}: Readonly<MattrixwvTabGroupProps>){
return (
<TabGroup
className={clsx(
@@ -24,9 +21,7 @@ export default function MattrixwvTabGroup(props: MattrixwvTabGroupProps){
<MattrixwvTabList>
{
tabs.map((tab, index) => (
<MattrixwvTab
key={index}
>
<MattrixwvTab key={index}>
{tab.tab}
</MattrixwvTab>
))
@@ -35,9 +30,7 @@ export default function MattrixwvTabGroup(props: MattrixwvTabGroupProps){
<MattrixwvTabPanels>
{
tabs.map((tab, index) => (
<MattrixwvTabPanel
key={index}
>
<MattrixwvTabPanel key={index}>
{tab.content}
</MattrixwvTabPanel>
))

View File

@@ -2,16 +2,11 @@ import type { MattrixwvTabListProps } from "$/types/TabTypes";
import { TabList } from "@headlessui/react";
export default function MattrixwvTabList(props: MattrixwvTabListProps){
const {
children
} = props;
export default function MattrixwvTabList({
children
}: Readonly<MattrixwvTabListProps>){
return (
<TabList
className="flex flex-row items-center justify-start w-full border-b"
>
<TabList className="flex flex-row items-center justify-start w-full border-b">
{children}
</TabList>
);

View File

@@ -2,16 +2,11 @@ import type { MattrixwvTabPanelProps } from "$/types/TabTypes";
import { TabPanel } from "@headlessui/react";
export default function MattrixwvTabPanel(props: MattrixwvTabPanelProps){
const {
children
} = props;
export default function MattrixwvTabPanel({
children
}: Readonly<MattrixwvTabPanelProps>){
return (
<TabPanel
className="flex flex-row items-start justify-center w-full h-full"
>
<TabPanel className="flex flex-row items-start justify-center w-full h-full">
{children}
</TabPanel>
);

View File

@@ -2,16 +2,11 @@ import type { MattrixwvTabPanelsProps } from "$/types/TabTypes";
import { TabPanels } from "@headlessui/react";
export default function MattrixwvTabPanels(props: MattrixwvTabPanelsProps){
const {
children
} = props;
export default function MattrixwvTabPanels({
children
}: Readonly<MattrixwvTabPanelsProps>){
return (
<TabPanels
className="flex flex-row items-start justify-center w-full h-full overflow-scroll"
>
<TabPanels className="flex flex-row items-start justify-center w-full h-full overflow-scroll">
{children}
</TabPanels>
);