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
Show hidden characters
{ | |
"compilerOptions": { | |
"esModuleInterop": true, | |
"forceConsistentCasingInFileNames": true, | |
"isolatedModules": true, | |
"moduleResolution": "node", | |
"preserveWatchOutput": true, | |
"skipLibCheck": true, | |
"noEmit": true, | |
"strict": true |
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
import styled from 'styled-components'; | |
export const StyledPopup = styled.div` | |
display: block; | |
max-width: 400px; | |
max-height: 150px; | |
position: absolute; | |
top: 0; | |
right: 0; | |
bottom: 0; |
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
{ | |
"name": "Popup", | |
"main": "index.tsx", | |
"version": "1.0.0" | |
} |
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
import { createPortal } from 'react-dom'; | |
import { StyledBackdrop, StyledPopup } from './Popup.styled'; | |
type TPopup = { | |
children?: React.ReactDOM; | |
showPopup: boolean; | |
setShowPopup: () => void; | |
} | |
export const Popup: React.FC<TPopup> = ({ children, showPopup, setShowPopup }) => { |
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
{ | |
"compilerOptions": { | |
"esModuleInterop": true, | |
"forceConsistentCasingInFileNames": true, | |
"isolatedModules": true, | |
"moduleResolution": "node", | |
"preserveWatchOutput": true, | |
"skipLibCheck": true, | |
"noEmit": true, | |
"strict": true |
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
{ | |
"name": "Board", | |
"main": "index.tsx", | |
"version": "1.0.0" | |
} |
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
export * from './Board'; |
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
import styled from 'styled-components'; | |
export const KanbanBoard = styled.div` | |
max-width: 1460px; | |
margin: auto; | |
display: grid; | |
grid-template-columns: 1fr 1fr 1fr 1fr; | |
grid-gap: 1em; | |
`; |
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
import { KanbanBoard } from './Board.styled'; | |
type TBoard = { | |
children?: React.ReactDOM; | |
} | |
export const Board: React.FC<TBoard> = ({ children }) => { | |
return ( | |
<KanbanBoard> | |
{children} |
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
let arrayWithDuplicates = [1, 2, 1] | |
let arrayWithoutDuplicates = [1, 2, 3] | |
new Set(arrayWithDuplicates).size < arrayWithDuplicates.length // returns TRUE | |
new Set(arrayWithoutDuplicates).size < arrayWithoutDuplicates.length // returns FALSE |