Skip to content

Instantly share code, notes, and snippets.

View sadamiak's full-sized avatar

Szymon sadamiak

  • Warsaw
View GitHub Profile
@sadamiak
sadamiak / component.js
Created November 25, 2020 14:36
Final component
// Make component accept props and add default color
function Icon({size, color = "#A41FAF", gradientColor = "#A41FAF"}) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
// Add default size
width={size === "big" ? 96 : 48}
height={size === "big" ? 62 : 31}
viewBox="0 0 48 31"
>
// Make component accept props and add default color
function Icon({size, color = "#A41FAF", gradientColor = "#A41FAF"}) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
// Add default size
width={size === "big" ? 96 : 48}
height={size === "big" ? 62 : 31}
viewBox="0 0 48 31"
>
@sadamiak
sadamiak / icon.svg
Created November 24, 2020 15:14
SVG icon
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sadamiak
sadamiak / index.html
Last active November 24, 2020 15:08
Standard HTML file with React, ReactDOM and Babel
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<!-- React -->
<script src="https://unpkg.com/react@17/umd/react.development.js" crossorigin></script>
<!-- ReactDOM -->
@sadamiak
sadamiak / fizzbuzz.js
Last active April 30, 2020 20:38
fizzbuzz with bug
var upperBand = 20;
var lowerBand = 1;
function fizzBuzz() {
var result = "";
for (var repetition = lowerBand; repetition <= 20; repetition++) {
if (repetition % 3 === 0 && repetition === 0)
result += "FizzBuzz ";
else if (repetition % 3 === 0)
result += "Fizz ";