Skip to content

Commit 37808b9

Browse files
committed
feat(components): add tabs to daisy implementation
1 parent 9cb27c0 commit 37808b9

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed

packages/daisy/src/components/tabs/index.ts

Whitespace-only changes.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import {component$, Slot} from '@builder.io/qwik';
2+
3+
interface TabProps {
4+
class?: string;
5+
className?: string;
6+
isActive?: boolean;
7+
isLifted?: boolean;
8+
isBordered?: boolean;
9+
}
10+
11+
export const Tab = component$(({ isActive, isBordered, isLifted, ...props } : TabProps) => {
12+
return (
13+
<a class={`tab ${isActive ? 'tab-active' : ''} ${isBordered ? 'tab-bordered' : ''} ${isLifted ? 'tab-lifted' : ''}`} {...props}>
14+
<Slot />
15+
</a>
16+
);
17+
});

packages/daisy/src/components/tabs/tabPanel.tsx

Whitespace-only changes.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import {component$, Slot} from '@builder.io/qwik';
2+
3+
interface TabsProps {
4+
class?: string;
5+
className?: string;
6+
boxed?: boolean;
7+
}
8+
9+
export const Tabs = component$(({ boxed = false, ...props } : TabsProps) => {
10+
return (
11+
<div class={`tabs ${boxed ? 'tabs-boxed' : ''}`} {...props}>
12+
<Slot />
13+
</div>
14+
);
15+
});

0 commit comments

Comments
 (0)