diff --git a/examples/button.tsx b/examples/button.tsx
index f51e4ef..a72479e 100644
--- a/examples/button.tsx
+++ b/examples/button.tsx
@@ -1,5 +1,5 @@
import { define } from '../src'
-import { Layout, ExampleSection } from './helpers'
+import { ExampleSection } from './ssr/helpers'
const Button = define('Button', {
base: 'button',
@@ -80,8 +80,8 @@ const ButtonRow = define('ButtonRow', {
alignItems: 'center',
})
-export const ButtonExamplesPage = () => (
-
+export const ButtonExamplesContent = () => (
+ <>
@@ -117,5 +117,5 @@ export const ButtonExamplesPage = () => (
-
+ >
)
diff --git a/examples/navigation.tsx b/examples/navigation.tsx
index 429cbaf..1232ff8 100644
--- a/examples/navigation.tsx
+++ b/examples/navigation.tsx
@@ -1,20 +1,25 @@
import { define } from '../src'
-import { Layout, ExampleSection } from './helpers'
-
-const Tabs = define('Tabs', {
- display: 'flex',
- gap: 0,
- borderBottom: '2px solid #e5e7eb',
+import { ExampleSection } from './ssr/helpers'
+const TabSwitcher = define('TabSwitcher', {
parts: {
- Tab: {
- base: 'button',
+ Input: {
+ base: 'input',
+ display: 'none', // Hide radio inputs
+ },
+ TabBar: {
+ display: 'flex',
+ gap: 0,
+ borderBottom: '2px solid #e5e7eb',
+ marginBottom: 24,
+ },
+ TabLabel: {
+ base: 'label',
padding: '12px 24px',
position: 'relative',
marginBottom: -2,
background: 'transparent',
- border: 'none',
borderBottom: '2px solid transparent',
color: '#6b7280',
fontSize: 14,
@@ -27,50 +32,76 @@ const Tabs = define('Tabs', {
color: '#111827',
}
}
+ },
+ Content: {
+ display: 'none',
+ padding: 20,
+ background: '#f9fafb',
+ borderRadius: 8,
}
},
- variants: {
- active: {
- parts: {
- Tab: {
- color: '#3b82f6',
- borderBottom: '2px solid #3b82f6',
- }
- }
- }
- },
-
- render({ props, parts: { Root, Tab } }) {
+ render({ props, parts: { Root, Input, TabBar, TabLabel, Content } }) {
return (
-
+