Skip to content

Instantly share code, notes, and snippets.

View gburning's full-sized avatar
🐋

Gabriel Burning gburning

🐋
  • Svep
  • Malmö, Sweden
View GitHub Profile
@gburning
gburning / file.js
Created April 18, 2021 14:30
Storybook - manual mapping of Vue props to argTypes
// This is a super basic way of mapping Vue props to argTypes in cases
// where Storybook (or rather vue-docgen-api) fails.
// See https://github.com/storybookjs/storybook/issues/11774
const toType = ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
const controlTypeMappings = {
String: 'text',
Boolean: 'boolean',
Array: 'object',