Skip to content
Snippets Groups Projects

Draft: Add story system

Open Kasper Seweryn requested to merge add-histoire into main
8 unresolved threads
10 files
+ 1656
483
Compare changes
  • Side-by-side
  • Inline
Files
10
histoire/setup.ts 0 → 100644
+ 20
0
 
import { defineSetupVue3 } from '@histoire/plugin-vue'
 
import './styles.css'
 
 
export const setupVue3 = defineSetupVue3(({ app, story, variant }) => {
 
app.config.globalProperties.$fwColors = ['primary', 'secondary', 'destructive'] as Color[]
 
app.config.globalProperties.$fwPastels = ['blue', 'red', 'purple', 'green', 'yellow'] as Pastel[]
 
 
app.config.globalProperties.$fwOmitHstProps = (state: Record<string, unknown>) => {
 
const props = Object.create(null)
 
 
for (const key in state) {
 
if (key.startsWith('_')) continue
 
if (key.startsWith('$')) continue
 
if (key.startsWith('variants')) continue
 
props[key] = state[key]
 
}
 
 
return props
 
}
 
})
Loading