Skip to content

Instantly share code, notes, and snippets.

View DanilAgafonov's full-sized avatar

Danil Agafonov DanilAgafonov

  • Diligent
  • Vancouver
  • 01:43 (UTC -07:00)
View GitHub Profile
@DanilAgafonov
DanilAgafonov / preview-head.html
Created March 20, 2023 19:27
Storybook v7 URL params
<script>
function slugify(str) {
return str
.toLowerCase()
.replace(/[^a-z0-9]+/g, '-')
.replace(/(^-|-$)+/g, '');
}
// screener-storybook is not compatible with storybook 7.
// It uses `selectedKind` and `selectedStory` query params to determine which story to render.