Skip to content

Commit

Permalink
docs: improve controls book
Browse files Browse the repository at this point in the history
  • Loading branch information
Akryum committed Oct 4, 2022
1 parent ad39f96 commit dde9249
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 4 deletions.
15 changes: 15 additions & 0 deletions packages/histoire-controls-stories/Intro.story.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
id: intro
title: Introduction
group: top
icon: carbon:bookmark
---

# Builtin controls & components

This book contains all the available builtin components to be used with [Histoire](https://histoire.dev/).

## How to use

- [For Vue](https://histoire.dev/guide/vue3/controls.html#builtin-controls)
- [For Svelte](https://histoire.dev/guide/svelte3/controls.html#builtin-controls)
20 changes: 20 additions & 0 deletions packages/histoire-controls-stories/histoire.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { HstVue } from '@histoire/plugin-vue'
export default defineConfig({
plugins: [
HstVue(),
{
name: 'builtin:tailwind-tokens',
},
],

storyMatch: ['../histoire-controls/src/**/*.story.vue'],
Expand All @@ -15,6 +18,23 @@ export default defineConfig({
favicon: 'histoire.svg',
},

tree: {
groups: [
{
id: 'top',
title: '',
},
{
id: 'controls',
title: 'Controls',
},
{
id: 'design-system',
title: 'Design System',
},
],
},

vite: {
server: {
fs: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ function initState () {
<template>
<Story
title="HstCheckbox"
group="controls"
:layout="{ type: 'single', iframe: false }"
>
<Variant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function initState () {
<template>
<Story
title="HstCheckboxList"
group="controls"
:layout="{ type: 'single', iframe: false }"
>
<Variant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ const colors = {

<template>
<Story
title="design-tokens/HstColorShades"
title="HstColorShades"
group="design-system"
responsive-disabled
>
<Variant title="default">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ const tokens = {

<template>
<Story
title="design-tokens/HstTokenGrid"
title="HstTokenGrid"
group="design-system"
responsive-disabled
>
<Variant title="default">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ const tokens = {

<template>
<Story
title="design-tokens/HstTokenList"
title="HstTokenList"
group="design-system"
responsive-disabled
>
<Variant title="default">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function initState () {
<template>
<Story
title="HstNumber"
group="controls"
>
<Variant
title="default"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ function initState () {
<template>
<Story
title="HstRadio"
group="controls"
:layout="{ type: 'single', iframe: false }"
>
<Variant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ function initState () {
<template>
<Story
title="HstSelect"
group="controls"
:layout="{
type: 'grid',
width: '100%',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const state = reactive({
<template>
<Story
title="HstSlider"
group="controls"
>
<HstSlider
v-model="state.value"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function initState () {
<template>
<Story
title="HstText"
group="controls"
:layout="{
type: 'grid',
width: '100%',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ function initState () {
</script>

<template>
<Story title="HstTextarea">
<Story
title="HstTextarea"
group="controls"
>
<Variant
title="default"
:init-state="initState"
Expand Down

0 comments on commit dde9249

Please sign in to comment.