Skip to content

Commit

Permalink
feat: add z index token for nav to support NexusLayoutHeader (#1460)
Browse files Browse the repository at this point in the history
## 📝 Changes

before:


![before](https://github.com/user-attachments/assets/0c932abf-7555-4e36-8aab-aac9bf650495)

after:


![after](https://github.com/user-attachments/assets/55fb2940-ff3b-4560-96db-e014dd6181eb)


## ✅ Checklist

Easy UI has certain UX standards that must be met. In general,
non-trivial changes should meet the following criteria:

- [ ] ~Visuals match Design Specs in Figma~
- [x] Stories accompany any component changes
- [x] Code is in accordance with our style guide
- [x] Design tokens are utilized
- [ ] ~Unit tests accompany any component changes~
- [ ] ~TSDoc is written for any API surface area~
- [ ] ~Specs are up-to-date~
- [x] Console is free from warnings
- [x] No accessibility violations are reported
- [x] Cross-browser check is performed (Chrome, Safari, Firefox)
- [x] Changeset is added

~Strikethrough~ any items that are not applicable to this pull request.
  • Loading branch information
OskiTheCoder authored Nov 12, 2024
1 parent 2f31d6f commit 00a9497
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/wise-avocados-exercise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@easypost/easy-ui-tokens": minor
"@easypost/easy-ui": minor
---

feat: adds z-index token for nav to support NexusLayoutHeader
1 change: 1 addition & 0 deletions easy-ui-react/src/NexusLayout/NexusLayout.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
}

.header {
z-index: design-token("z-index.nav");
position: sticky;
top: 0;

Expand Down
8 changes: 7 additions & 1 deletion easy-ui-react/src/NexusLayout/NexusLayout.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { Text } from "../Text";
import { HorizontalStack } from "../HorizontalStack";
import { Menu } from "../Menu";
import { NexusLayout } from "./NexusLayout";
import { PlaceholderBox } from "../utilities/storybook";

type Story = StoryObj<typeof NexusLayout>;

Expand Down Expand Up @@ -175,13 +176,18 @@ export const MultipageContent: Story = {
</Button>
</HorizontalStack>
</NexusLayout.MultipageHeader>
<div style={{ height: 400 }}>
<div style={{ height: 400, position: "relative" }}>
<Text variant="body2">
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Cumque
obcaecati iusto neque architecto, quae dolore illo. Saepe ipsum
voluptates reprehenderit repellendus deleniti, molestias
placeat, consectetur et nihil quisquam, numquam pariatur!
</Text>
<PlaceholderBox
style={{ position: "absolute", top: "100px", zIndex: 50 }}
>
z-index = 50
</PlaceholderBox>
</div>
</NexusLayout.MultipageContent>
</NexusLayout.MultipageContainer>
Expand Down
7 changes: 5 additions & 2 deletions easy-ui-tokens/src/z-index/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
"input_icon": {
"value": "1"
},
"notification": {
"value": "999999"
"nav": {
"value": "1000"
},
"modal": {
"value": "1300"
},
"notification": {
"value": "999999"
}
}
}

0 comments on commit 00a9497

Please sign in to comment.