Skip to content

Commit

Permalink
fix(docs): Light Theme Code Preview Colors
Browse files Browse the repository at this point in the history
Also made tablet sized layouts behave like desktop
  • Loading branch information
mlaursen committed May 14, 2021
1 parent 57033bd commit c9cc6a7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
@import '~@react-md/app-bar/dist/mixins';
@import '~@react-md/sheet/dist/variables';
@import '~@react-md/tree/dist/mixins';

.sheet {
background-color: $rmd-sheet-dark-elevation-background-color;
}

.tree {
@include rmd-tree-depths(
$selector-prefix: ':global ',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
TreeData,
useTreeItemExpansion,
} from "@react-md/tree";
import { MobileOnly, useIsUserInteractionMode } from "@react-md/utils";
import { PhoneOnly, useIsUserInteractionMode } from "@react-md/utils";

import CssIcon from "icons/CssIcon";
import FileSVGIcon from "icons/FileSVGIcon";
Expand Down Expand Up @@ -122,7 +122,7 @@ export default function SandboxFileTree({
position="left"
overlay={!inline}
portal={false}
className={cn({
className={cn(styles.sheet, {
[styles.inline]: inline,
})}
mountOnEnter={!inline}
Expand All @@ -131,11 +131,11 @@ export default function SandboxFileTree({
disableTransition={disableTransition}
disableTabFocusWrap={isKeyboard}
>
<MobileOnly>
<PhoneOnly>
<AppBar theme="default">
<NavigationActions from={from} onRequestClose={onRequestClose} />
</AppBar>
</MobileOnly>
</PhoneOnly>
<Tree
id="code-previewer-files"
className={styles.tree}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ export default function SandboxNavigation({
onRequestFiles,
onRequestClose,
}: SandboxNavigationProps): ReactElement {
const { isPhone, isTablet } = useAppSize();
const mobile = isPhone || isTablet;
const { isPhone } = useAppSize();

return (
<AppBar height="prominent-dense" theme="default" className={styles.header}>
Expand All @@ -43,7 +42,7 @@ export default function SandboxNavigation({
<AppBarTitle id="sandbox-dialog-title" noWrap>
{name}
</AppBarTitle>
{!mobile && (
{!isPhone && (
<NavigationActions from={from} onRequestClose={onRequestClose} />
)}
</AppBar>
Expand Down

1 comment on commit c9cc6a7

@vercel
Copy link

@vercel vercel bot commented on c9cc6a7 May 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.