Skip to content

Instantly share code, notes, and snippets.

View Sheraff's full-sized avatar
🐙

Flo Sheraff

🐙
View GitHub Profile
@Sheraff
Sheraff / codeswing.json
Last active August 12, 2022 06:23
spotify filters
{
"scripts": [],
"styles": [],
"themePreview": false,
"layout": "splitLeft"
}
@Sheraff
Sheraff / codeswing.json
Last active July 25, 2021 05:52
spinner button
{
"scripts": [],
"styles": [],
"themePreview": false
}
@Sheraff
Sheraff / codeswing.json
Last active July 24, 2021 14:47
multi step progress
{
"scripts": [],
"styles": []
}
@Sheraff
Sheraff / codeswing.json
Last active July 24, 2021 08:48
stripe nav 2
{
"scripts": [],
"styles": [],
"themePreview": false
}
@Sheraff
Sheraff / codeswing.json
Last active July 23, 2021 21:27
stripe nav
{
"scripts": [],
"styles": [],
"themePreview": false
}
@Sheraff
Sheraff / index.html
Last active July 22, 2021 10:35
Navigation context controls target
<p>One tab (navigation context) can control the navigation of another. Try clicking one of these links, come back here, and click the other.
<ul>
<li><a href="https://picsum.photos/200/300" target="picsum">vertical</a></li>
<li><a href="https://picsum.photos/300/200" target="picsum">horizontal</a></li>
</ul>
<p>This can be prevented by the targeted context by setting the <code>cross-origin-opener-policy: same-origin</code> HTTP header
<ul>
<li><a href="https://www.louvre.fr/" target="louvre">louvre.fr</a></li>
<li><a href="https://www.louvre.fr/visiter" target="louvre">louvre.fr/visiter</a></li>
</ul>
@Sheraff
Sheraff / codeswing.json
Last active July 31, 2021 16:31
JS class enum
{
"scripts": [],
"showConsole": true
}
@Sheraff
Sheraff / dynamicImportWithPureLoaderProps.js
Created July 10, 2021 15:06
Next.js dynamic import to split React components into Pure markup and Controller logic
import { createContext, useContext } from 'react'
/**
* @example
* // in ComponentController.jsx
* const Loadable = dynamicImportWithPureLoaderProps((getProps) => dynamic(
* () => import('./ComponentWithHooks'),
* {
* loading: () => <ComponentPure {...getProps()} />,
* ssr: false,
@Sheraff
Sheraff / codeswing.json
Last active July 5, 2021 22:52
a11y <tabs>
{
"scripts": [],
"styles": []
}
@Sheraff
Sheraff / codeswing.json
Last active July 6, 2021 15:20
a11y example of form
{
"scripts": [],
"styles": []
}