Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
2brownc committed Jun 4, 2022
1 parent 921ddee commit a726ef3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 24 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# calc

* A calculator built using ReactJS.
* Provides AC and DEL operations.
* Handles "divide by zero" and other invalid operations.
* Takes input from keypad in the app and also from the keyboard.
* Warns when input number is not a safe integer.
- A calculator built using ReactJS.
- Provides AC and DEL operations.
- Handles "divide by zero" and other invalid operations.
- Takes input from keypad in the app and also from the keyboard.
- Warns when input number is not a safe integer.

[See the app in action!](https://calc-react.pages.dev/)
2 changes: 1 addition & 1 deletion src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
font-size: larger;
}

.warningBox{
.warningBox {
padding-top: 10px;
}
38 changes: 20 additions & 18 deletions src/components/Header.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
import react from 'react';
import AppBar from '@mui/material/AppBar';
import Container from '@mui/material/Container';
import Toolbar from '@mui/material/Toolbar';
import Tooltip from '@mui/material/Tooltip';
import IconButton from '@mui/material/IconButton'
import Box from '@mui/material/Box'
import GitHubIcon from '@mui/icons-material/GitHub';
import CalculateIcon from '@mui/icons-material/Calculate';
import react from "react";
import AppBar from "@mui/material/AppBar";
import Container from "@mui/material/Container";
import Toolbar from "@mui/material/Toolbar";
import Tooltip from "@mui/material/Tooltip";
import IconButton from "@mui/material/IconButton";
import Box from "@mui/material/Box";
import GitHubIcon from "@mui/icons-material/GitHub";
import CalculateIcon from "@mui/icons-material/Calculate";

const GithubLink= ({ link }) => {
const GithubLink = ({ link }) => {
return (
<a href={link} target="_blank">
<GitHubIcon />
</a>
);
}
};

const Header = ({heading, gitLink}) => {
const Header = ({ heading, gitLink }) => {
return (
<AppBar position="static">
<Container maxWidth="xl">
<Toolbar disableGutters>
<CalculateIcon sx={{
display: { xs: "none", md: "flex" },
mr: 1
}} />
<CalculateIcon
sx={{
display: { xs: "none", md: "flex" },
mr: 1,
}}
/>
<span>{heading}</span>
<Box sx={{ flexGrow: 1 }}/>
<Box sx={{ flexGrow: 1 }} />
<Box sx={{ flexGrow: 0 }}>
<Tooltip title="View App Source">
<IconButton sx={{ p: 0 }}>
Expand All @@ -38,6 +40,6 @@ const Header = ({heading, gitLink}) => {
</Container>
</AppBar>
);
}
};

export default Header;

0 comments on commit a726ef3

Please sign in to comment.