Skip to content

Commit 804cc97

Browse files
committed
add usage examples
1 parent 7a8ac7f commit 804cc97

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

apps/storybook/stories/ZIndex.stories.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ import ZIndex from "./ZIndex";
77

88
[getZIndex](https://cambly-syntax.vercel.app/?path=/docs/z-index--docs) is a utility function that returns a z-index value based on the layer and local layer.
99

10+
```
11+
<Navbar zIndex={getZIndex("sticky")} />
12+
<Modal zIndex={getZIndex("modal")} />
13+
```
14+
1015
## Parameters
1116

1217
- `layer`: The layer to get the z-index for.

packages/syntax-core/src/getZIndex.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
/**
22
* [getZIndex](https://cambly-syntax.vercel.app/?path=/docs/ZIndex--docs) is a utility function that returns a z-index value based on the layer and local layer.
3+
*
4+
* Usage:
5+
* ```
6+
* <Navbar zIndex={getZIndex("sticky")} />
7+
* <Modal zIndex={getZIndex("modal")} />
8+
* ```
39
*/
410
export default function getZIndex(
511
/**

0 commit comments

Comments
 (0)