Skip to content

Commit 96d5faf

Browse files
committed
docs: Document AppBar component
1 parent 136d726 commit 96d5faf

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: 'App Bar'
3+
description: |
4+
The App Bar is a component that can be used to display content and actions related to the
5+
current screen.
6+
---
7+
8+
import TypeDoc from '@docs/solid/components/layout/app-bar.md';
9+
import { BaseColor } from '@packages/browser-utils';
10+
import { Interactive } from '@src/components/interactive';
11+
12+
The App Bar is a component that can be used to display content and actions related to the
13+
current screen.
14+
15+
<TypeDoc />

packages/solid/src/components/layout/app-bar/app-bar.component.tsx

+25
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,35 @@ import { AppBarProps, attributes, classNames } from '@src/main';
22
import { Component, ParentProps } from 'solid-js';
33
import { Dynamic } from 'solid-js/web';
44

5+
/**
6+
* A section of the app bar.
7+
* @param props - {@link ParentProps}
8+
* @returns The section component.
9+
*/
510
const Section: Component<ParentProps> = (props) => (
611
<div {...classNames('spx-app-bar-section')}>{props.children}</div>
712
);
813

14+
/**
15+
* A flexibile app bar component that can be used to display content and actions related
16+
* to the current screen.
17+
* @param props - {@link AppBarProps}
18+
* @returns The app bar component.
19+
* @example
20+
* ```tsx
21+
* <AppBar>
22+
* <AppBar.Section>
23+
* Left content
24+
* </AppBar.Section>
25+
* <AppBar.Section>
26+
* Center content
27+
* </AppBar.Section>
28+
* <AppBar.Section>
29+
* Right content
30+
* </AppBar.Section>
31+
* </AppBar>
32+
* ```
33+
*/
934
const AppBar: Component<AppBarProps> & {
1035
Section: Component<ParentProps>;
1136
} = ((props) => {

0 commit comments

Comments
 (0)