Skip to content

Commit 731c676

Browse files
committed
docs(headless): add pagination page
1 parent 4a0718a commit 731c676

File tree

8 files changed

+72
-0
lines changed

8 files changed

+72
-0
lines changed

apps/website/src/_state/component-statuses.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export const statusByComponent: ComponentKitsStatuses = {
4343
Accordion: ComponentStatus.Beta,
4444
Carousel: ComponentStatus.Planned,
4545
Combobox: ComponentStatus.Beta,
46+
Pagination: ComponentStatus.Draft,
4647
Popover: ComponentStatus.Draft,
4748
Modal: ComponentStatus.Beta,
4849
Select: ComponentStatus.Draft,
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { JSXNode, component$ } from '@builder.io/qwik';
2+
import { PreviewCodeExampleTabs } from '../../../_components/preview-code-example/preview-code-example-tabs';
3+
4+
import Basic from './examples/basic';
5+
import basicCode from './examples/basic?raw';
6+
7+
export type Example = {
8+
component: JSXNode;
9+
code: string;
10+
cssClasses?: string;
11+
};
12+
13+
export const examples: Record<string, Example> = {
14+
basic: {
15+
component: <Basic />,
16+
code: basicCode,
17+
},
18+
};
19+
20+
export type ShowExampleProps = {
21+
example: string;
22+
};
23+
24+
export const ShowExample = component$(({ example }: ShowExampleProps) => {
25+
const { component, code } = examples[example];
26+
return (
27+
<PreviewCodeExampleTabs code={code}>
28+
<div q:slot="actualComponent">{component}</div>
29+
</PreviewCodeExampleTabs>
30+
);
31+
});
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { component$, useSignal, type QwikIntrinsicElements } from '@builder.io/qwik';
2+
import { Modal, ModalContent, ModalFooter, ModalHeader } from '@qwik-ui/headless';
3+
4+
export default component$(() => {
5+
const showSig = useSignal(false);
6+
7+
return <>ciao giorgio</>;
8+
});
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export { statusByComponent } from '../../../../../_state/component-statuses';
2+
export { APITable } from '../../../_components/api-table/api-table';
3+
export { KeyboardInteractionTable } from '../../../_components/keyboard-interaction-table/keyboard-interaction-table';
4+
export { StatusBanner } from '../../../_components/status-banner/status-banner';
5+
export { AnatomyTable } from '../../../_components/anatomy-table/anatomy-table';
6+
export * from './examples';

apps/website/src/routes/docs/headless/(components)/pagination/index.css

Whitespace-only changes.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Qwik UI | Modal
3+
---
4+
import ImgTestImage from '/public/images/test-image.png?jsx';
5+
6+
import {
7+
KeyboardInteractionTable,
8+
APITable,
9+
AnatomyTable,
10+
StatusBanner,
11+
statusByComponent,
12+
ShowExample,
13+
BackdropCss,
14+
BuildingBlocksSnip,
15+
PageLoadSnip,
16+
AnimationSnip
17+
} from './exports';
18+
19+
import testImage from '../../../../../../public/images/test-image.png'
20+
21+
<StatusBanner status={statusByComponent.headless.Modal}/>
22+
23+
# Pagination
24+
25+
<ShowExample example="basic" />

apps/website/src/routes/docs/headless/menu.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- [Accordion](/docs/headless/accordion)
1212
- [Combobox](/docs/headless/combobox)
1313
- [Modal](/docs/headless/modal)
14+
- [Pagination](/docs/headless/pagination)
1415
- [Popover](/docs/headless/popover)
1516
- [Select](/docs/headless/select)
1617
- [Separator](/docs/headless/separator)

0 commit comments

Comments
 (0)