josefandersson / HexGrid
0 likes
0 forks
1 files
Last active 2 years ago
Fancy hex grid component by Mr Gabbeboi
| 1 | import { css } from "@linaria/core" |
| 2 | import type { CSSProperties, ReactNode } from "react" |
| 3 | import React from "react" |
| 4 | |
| 5 | /** width / heigt */ |
| 6 | const hexAspectRatio = 4 / 3 * Math.sqrt(3) / 2 |
| 7 | |
| 8 | export function HexGrid({ |
| 9 | gap, |
| 10 | rows, |
josefandersson / Ugly fizzbuzz
0 likes
0 forks
1 files
Last active 2 years ago
First code written after a 16 day vacation!!
| 1 | const fizzBuzz = (num=1) => num <= 100 && ( |
| 2 | console.log(((num % 3 === 0 ? 'fizz' : '') + (num % 5 === 0 ? 'buzz' : '')) || num) |
| 3 | || fizzBuzz(num + 1) |
| 4 | ) |
Newer
Older