Skip to content

Commit 5870fc6

Browse files
committed
feat: keep bottomsheet zindex at top
1 parent 97cf4dd commit 5870fc6

File tree

7 files changed

+27
-10
lines changed

7 files changed

+27
-10
lines changed

apps/demo/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# index
22

3+
## 0.1.17
4+
5+
### Patch Changes
6+
7+
- Updated dependencies
8+
- material-web-components-react@0.3.12
9+
310
## 0.1.16
411

512
### Patch Changes

apps/demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "index",
3-
"version": "0.1.16",
3+
"version": "0.1.17",
44
"private": true,
55
"packageManager": "pnpm@9.1.0",
66
"scripts": {

apps/demo/src/app/page.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import SegmentedButton, {
2727
SegmentedButtonSet,
2828
} from "material-web-components-react/segmented-button";
2929
import Select, { SelectOption } from "material-web-components-react/select";
30-
// import { BottomSheet } from "material-web-components-react/sheet";
30+
import { BottomSheet } from "material-web-components-react/sheet";
3131
import Slider from "material-web-components-react/slider";
3232
import Switch from "material-web-components-react/switch";
3333
import Tabs, { PrimaryTab } from "material-web-components-react/tabs";
@@ -583,7 +583,7 @@ export default function Home() {
583583
</DemoSection>
584584

585585
<DemoSection title="Containment">
586-
{/* <ComponentDemo title={"Bottom sheet"}>
586+
<ComponentDemo title={"Bottom sheet"}>
587587
<div className="w-full">
588588
<Button
589589
variant="text"
@@ -598,7 +598,7 @@ export default function Home() {
598598
{showModalBottomSheet ? "Hide modal bottom sheet" : "Show modal bottom sheet"}
599599
</Button>
600600
</div>
601-
</ComponentDemo> */}
601+
</ComponentDemo>
602602
<ComponentDemo title={"Card"}>
603603
<div className="flex flex-row justify-center items-center gap-2">
604604
<Card className="p-2 aspect-square flex justify-between">
@@ -1068,7 +1068,7 @@ export default function Home() {
10681068
</ComponentDemo>
10691069
</DemoSection>
10701070
</Column>
1071-
{/*
1071+
10721072
<BottomSheet
10731073
open={showBottomSheet}
10741074
onOpenChange={(open) => setShowBottomSheet(open)}
@@ -1188,7 +1188,7 @@ export default function Home() {
11881188
</div>
11891189
</div>
11901190
</BottomSheet>
1191-
*/}
1191+
11921192
</>
11931193
);
11941194
}

apps/demo/tailwind.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ const config: Config = {
3737
{
3838
pattern: /max-(w|h)-(.)/,
3939
},
40+
{
41+
pattern: /([a-zA-Z]+)-./,
42+
},
4043
],
4144
theme: {
4245
extend: {

packages/ui/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# material-web-react
22

3+
## 0.3.12
4+
5+
### Patch Changes
6+
7+
- Make bottom sheet take highest precedence
8+
39
## 0.3.11
410

511
### Patch Changes

packages/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "material-web-components-react",
3-
"version": "0.3.11",
3+
"version": "0.3.12",
44
"author": "Grayhat Team",
55
"type": "module",
66
"keywords": [

packages/ui/src/sheet/index.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,10 @@ export const BottomSheet: React.FC<BottomSheetProps> = ({
3232
<Drawer.Root {...props}>
3333
<Drawer.Portal>
3434
<Drawer.Overlay
35-
className={`${
36-
variant === "modal" ? "fixed inset-0 bg-black/40" : ""
37-
}`}
35+
className={twMerge(
36+
variant === "modal" ? "fixed inset-0 bg-black/40" : "",
37+
"!z-[999999]"
38+
)}
3839
/>
3940
<Drawer.Content
4041
className={`fixed inset-x-0 bottom-0 m-auto mt-24 flex w-full flex-col overflow-hidden !rounded-t-[2rem] bg-zinc-100 px-6 sm:max-w-screen-sm sm:px-14`}

0 commit comments

Comments
 (0)