import { Children, ReactElement } from 'react';
import styles from './Gallery.module.scss';

const Gallery = ({
  children,
  columns = 2,
}: {
  children: ReactElement;
  columns: number;
}) => {
  const columnClass = styles[`wrapper--${columns}-columns`];

  return (
    <ul className={`${styles.wrapper} ${columnClass}`}>
      {Children.map(children, (child) => {
        return <li className={styles.item}>{child}</li>;
      })}
    </ul>
  );
};

export default Gallery;
.com Git repository'/>
<link rel='vcs-git' href='git://git.armand.philippot.euwww.armandphilippot.com' title='www.armandphilippot.com Git repository'/>
</head>
<body>
<div id='cgit'><table id='header'>
<tr>
<td class='logo' rowspan='2'><a href='/'><img src='/cgit-data/cgit.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/'>index</a> : <a href='/www.armandphilippot.com/'>www.armandphilippot.com</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='4f768afe543bbf9e1857c41d03804f8e37ab3512'/><select name='h' onchange='this.form.submit();'>
<option value='main' selected='selected'>main</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>The frontend of my personal website.</td><td class='sub right'>Armand Philippot</td></tr></table>
<table class='tabs'><tr><td>
<a href='/www.armandphilippot.com/about/'>about</a><a href='/www.armandphilippot.com/'>summary</a><a href='/www.armandphilippot.com/refs/?id=4f768afe543bbf9e1857c41d03804f8e37ab3512'>refs</a><a href='/www.armandphilippot.com/log/src/components/templates/page/index.ts'>log</a><a class='active' href='/www.armandphilippot.com/tree/src/components/templates/page/index.ts?id=4f768afe543bbf9e1857c41d03804f8e37ab3512'>tree</a><a href='/www.armandphilippot.com/commit/src/components/templates/page/index.ts?id=4f768afe543bbf9e1857c41d03804f8e37ab3512'>commit</a><a href='/www.armandphilippot.com/diff/src/components/templates/page/index.ts?id=4f768afe543bbf9e1857c41d03804f8e37ab3512'>diff</a><a href='/www.armandphilippot.com/stats/src/components/templates/page/index.ts'>stats</a></td><td class='form'><form class='right' method='get' action='/www.armandphilippot.com/log/src/components/templates/page/index.ts'>
<input type='hidden' name='id' value='4f768afe543bbf9e1857c41d03804f8e37ab3512'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/www.armandphilippot.com/tree/?id=4f768afe543bbf9e1857c41d03804f8e37ab3512'>root</a>/<a href='/www.armandphilippot.com/tree/src?id=4f768afe543bbf9e1857c41d03804f8e37ab3512'>src</a>/<a href='/www.armandphilippot.com/tree/src/components?id=4f768afe543bbf9e1857c41d03804f8e37ab3512'>components</a>/<a href='/www.armandphilippot.com/tree/src/components/templates?id=4f768afe543bbf9e1857c41d03804f8e37ab3512'>templates</a>/<a href='/www.armandphilippot.com/tree/src/components/templates/page?id=4f768afe543bbf9e1857c41d03804f8e37ab3512'>page</a>/<a href='/www.armandphilippot.com/tree/src/components/templates/page/index.ts?id=4f768afe543bbf9e1857c41d03804f8e37ab3512'>index.ts</a></div><div class='content'>blob: cdd5a64813f72679043b60cfa9841075c29d3302 (<a href='/www.armandphilippot.com/plain/src/components/templates/page/index.ts?id=4f768afe543bbf9e1857c41d03804f8e37ab3512'>plain</a>)
<table summary='blob content' class='blob'>
<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a>
</pre></td>
<td class='lines'><pre><code>