Skip to content

Commit c9cc6a7

Browse files
committed
fix(docs): Light Theme Code Preview Colors
Also made tablet sized layouts behave like desktop
1 parent 57033bd commit c9cc6a7

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

packages/documentation/src/components/DemoSandbox/SandboxFileTree.module.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
@import '~@react-md/app-bar/dist/mixins';
2+
@import '~@react-md/sheet/dist/variables';
23
@import '~@react-md/tree/dist/mixins';
34

5+
.sheet {
6+
background-color: $rmd-sheet-dark-elevation-background-color;
7+
}
8+
49
.tree {
510
@include rmd-tree-depths(
611
$selector-prefix: ':global ',

packages/documentation/src/components/DemoSandbox/SandboxFileTree.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
TreeData,
1515
useTreeItemExpansion,
1616
} from "@react-md/tree";
17-
import { MobileOnly, useIsUserInteractionMode } from "@react-md/utils";
17+
import { PhoneOnly, useIsUserInteractionMode } from "@react-md/utils";
1818

1919
import CssIcon from "icons/CssIcon";
2020
import FileSVGIcon from "icons/FileSVGIcon";
@@ -122,7 +122,7 @@ export default function SandboxFileTree({
122122
position="left"
123123
overlay={!inline}
124124
portal={false}
125-
className={cn({
125+
className={cn(styles.sheet, {
126126
[styles.inline]: inline,
127127
})}
128128
mountOnEnter={!inline}
@@ -131,11 +131,11 @@ export default function SandboxFileTree({
131131
disableTransition={disableTransition}
132132
disableTabFocusWrap={isKeyboard}
133133
>
134-
<MobileOnly>
134+
<PhoneOnly>
135135
<AppBar theme="default">
136136
<NavigationActions from={from} onRequestClose={onRequestClose} />
137137
</AppBar>
138-
</MobileOnly>
138+
</PhoneOnly>
139139
<Tree
140140
id="code-previewer-files"
141141
className={styles.tree}

packages/documentation/src/components/DemoSandbox/SandboxNavigation.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ export default function SandboxNavigation({
2424
onRequestFiles,
2525
onRequestClose,
2626
}: SandboxNavigationProps): ReactElement {
27-
const { isPhone, isTablet } = useAppSize();
28-
const mobile = isPhone || isTablet;
27+
const { isPhone } = useAppSize();
2928

3029
return (
3130
<AppBar height="prominent-dense" theme="default" className={styles.header}>
@@ -43,7 +42,7 @@ export default function SandboxNavigation({
4342
<AppBarTitle id="sandbox-dialog-title" noWrap>
4443
{name}
4544
</AppBarTitle>
46-
{!mobile && (
45+
{!isPhone && (
4746
<NavigationActions from={from} onRequestClose={onRequestClose} />
4847
)}
4948
</AppBar>

0 commit comments

Comments
 (0)