Skip to content

Commit

Permalink
update styling
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahsonder committed Aug 18, 2024
1 parent 9c1d0b7 commit 828d2e9
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion demo/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const config: Config = {
roughjs: require.resolve("roughjs"),
"memory-viz": require.resolve("../memory-viz/src"),
// Mocks a file (see fileMock.js) each time any of the below file types are imported.
"\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|css|less|sass|scss)$":
"./mocks/fileMock.js",
},

Expand Down
9 changes: 2 additions & 7 deletions demo/src/MemoryModelsMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { ReactNode, useState } from "react";
import { Box, Button, Menu } from "@mui/material";
import ExpandMoreRoundedIcon from "@mui/icons-material/ExpandMoreRounded";
import "./css/styles.css";

type MemoryModelsMenuPropTypes = {
menuName: string;
Expand All @@ -23,13 +24,7 @@ export default function MemoryModelsMenu(props: MemoryModelsMenuPropTypes) {
<Button
onClick={handleClick}
data-testid={props.testId}
sx={{
textTransform: "none",
"& .MuiSvgIcon-root": {
transition: "transform 0.2s ease-in-out",
transform: open ? "rotate(180deg)" : "rotate(0deg)",
},
}}
className={`menu-button ${open ? "open" : ""}`}
>
{props.menuName}
<ExpandMoreRoundedIcon />
Expand Down
1 change: 0 additions & 1 deletion demo/src/MemoryModelsUserInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ function MemoryModelsTextInput(props: MemoryModelsTextInputPropTypes) {
rows={10}
variant="outlined"
value={props.textData}
style={{ fontFamily: "Monospace" }}
onChange={handleTextFieldChange}
/>
);
Expand Down
4 changes: 0 additions & 4 deletions demo/src/SvgDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ export default function SvgDisplay(props: SvgDisplayPropTypes) {
ref={canvasRef}
width={canvasWidth}
height={canvasHeight}
style={{
width: canvasWidth,
height: canvasHeight,
}}
/>
</Paper>
);
Expand Down
14 changes: 14 additions & 0 deletions demo/src/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,17 @@ input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}

.menu-button {
text-transform: none !important;
}

.menu-button .MuiSvgIcon-root {
transition: transform 0.2s ease-in-out;
transform: rotate(0deg);
}

.menu-button.open .MuiSvgIcon-root {
transition: transform 0.2s ease-in-out;
transform: rotate(180deg);
}
2 changes: 1 addition & 1 deletion demo/src/mocks/fileMock.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Mock file for Jest tests which include images
// Mock file for Jest tests which include images or imported styling
module.exports = "";

0 comments on commit 828d2e9

Please sign in to comment.