-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from devklick/dev
Refactor to Styled Components
- Loading branch information
Showing
33 changed files
with
351 additions
and
374 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
1 change: 0 additions & 1 deletion
1
src/programs/Calculator/CalculatorLauncher/CalculatorLauncher.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import styled from "@emotion/styled"; | ||
|
||
export const StyledCalc = styled.div` | ||
width: 100%; | ||
height: 100%; | ||
display: grid; | ||
grid-template-rows: 1fr 1fr 3fr; | ||
grid-template-areas: | ||
"input" | ||
"output" | ||
"buttons"; | ||
box-shadow: 0px 0px 4px rgb(0, 0, 0, 0.5) inset; | ||
padding: 10px; | ||
border-radius: 10px; | ||
box-sizing: border-box; | ||
gap: 10px; | ||
`; | ||
|
||
export const StyledInputOutput = styled.div<{ | ||
direction: "input" | "output"; | ||
}>` | ||
box-shadow: 0px 0px 4px rgb(0, 0, 0, 0.5) inset; | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
justify-content: flex-end; | ||
align-items: center; | ||
padding: 20px; | ||
box-sizing: border-box; | ||
grid-area: ${(props) => props.direction}; | ||
`; | ||
|
||
export const StyledInputOutputContents = styled.div` | ||
text-shadow: 2px 2px 4px rgb(0, 0, 0, 0.5); | ||
`; | ||
|
||
export const StyledButtons = styled.div` | ||
min-height: 0; | ||
grid-area: buttons; | ||
width: 100%; | ||
height: 100%; | ||
justify-self: center; | ||
display: grid; | ||
grid-template-columns: 1fr 1fr 1fr 1fr; | ||
grid-template-rows: 1fr 1fr 1fr 1fr 1fr; | ||
box-sizing: border-box; | ||
`; | ||
|
||
export const StyledButton = styled.button` | ||
text-align: center; | ||
cursor: default; | ||
border-radius: 20px; | ||
justify-self: center; | ||
width: 80%; | ||
height: 80%; | ||
box-shadow: 2px 2px 4px rgb(0, 0, 0, 0.5); | ||
box-sizing: border-box; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
background-color: inherit; | ||
color: inherit; | ||
border-width: 1px; | ||
&:hover { | ||
backdrop-filter: brightness(150%); | ||
transition: ease-in 0.2s; | ||
} | ||
&:active { | ||
box-shadow: 2px 2px 4px rgb(0, 0, 0, 0.5) inset; | ||
} | ||
`; | ||
|
||
export const StyledButtonContent = styled.span``; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import DirectoryOrFile from "./DirectoryOrFile"; | ||
|
||
export default DirectoryOrFile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import styled from "@emotion/styled"; | ||
import { ReactComponent as FolderIcon } from "../../../assets/icons/folder-icon.svg"; | ||
|
||
export const StyledItem = styled.div<{ selected: boolean }>` | ||
width: 100%; | ||
padding: 10px; | ||
overflow-wrap: break-word; | ||
word-break: normal; | ||
box-sizing: border-box; | ||
aspect-ratio: 1/1; | ||
height: auto; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
flex-direction: column; | ||
gap: 10px; | ||
border-radius: 10px; | ||
`; | ||
|
||
export const StyledItemName = styled.span``; | ||
|
||
export const StyledFolderIcon = styled(FolderIcon)` | ||
height: 80%; | ||
width: 80%; | ||
path { | ||
fill: white; | ||
} | ||
`; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.