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
const setAutoscalingText = (text) => { | |
// Select text | |
const textObject = this.element.select(`#${clientCustomization.id}`) | |
if (textObject) { | |
// get coordinates | |
const textCoordinates = textObject.getBBox() | |
const boundingBox = this.element.select('rect').getBBox() |
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 { ThemeProvider } from 'styled-components' | |
export default function App() { | |
return ( | |
<ThemeProvider theme={{ mode: 'light' }}> | |
<Wrapper> | |
Hello World | |
</Wrapper> | |
</ThemeProvider> | |
); |
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' | |
const Wrapper = styled.div` | |
background-color: ${props => props.theme.backgroundColor}; | |
`; |
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
{ | |
"Print to console": { | |
"scope": "javascript,typescript", | |
"prefix": "log", | |
"body": [ | |
"console.log('$1')", | |
"$2" | |
], | |
"description": "Log output to console" | |
}, |
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
{ | |
"Print to console": { | |
"scope": "javascript,typescript", | |
"prefix": "log", | |
"body": [ | |
"console.log('$1')", | |
"$2" | |
], | |
"description": "Log output to console" | |
}, |
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
const possibleCoins = [10, 5, 2]; | |
const amount = process.argv.slice(2); | |
function getChange(given) { | |
if (!given || given === 0) { | |
return []; | |
} | |
let change = []; | |
for (const coin of possibleCoins) { |
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
const [amount] = process.argv.slice(2); | |
function getChange(given, denominations = [10, 5, 2]) { | |
if (!given || given === 0) { | |
return []; | |
} | |
let minChange = Infinity; | |
let minChangeArr; | |
for (const coin of denominations) { |
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
{ | |
"editor.detectIndentation": false, | |
"files.insertFinalNewline": true, | |
"files.hotExit": "off", | |
"editor.trimAutoWhitespace": true, | |
"files.trimTrailingWhitespace": true, | |
"editor.useTabStops": true, | |
"keyboard.dispatch": "keyCode", | |
"editor.formatOnType": true, // format code as you type | |
"editor.formatOnSave": true, // format code when you hit save |