Skip to content

Commit

Permalink
Use self-documenting components in storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
rijkvanzanten committed Jun 21, 2023
1 parent aa85a80 commit c2aae34
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/src/base-icon/base-icon.story.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const state = reactive({
</script>

<template>
<Story title="Base / Icon" auto-props-disabled>
<Story title="Base / Icon">
<template #controls>
<HstText v-model="state.name" title="Name" />
<HstSlider v-model="state.weight" :step="100" :min="100" :max="700" title="Weight" />
Expand Down
14 changes: 14 additions & 0 deletions components/src/base-icon/base-icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,22 @@
import { computed, unref } from 'vue';
export interface BaseIconProps {
/**
* Name of the Material Symbol to use.
* @see https://fonts.google.com/icons for all available icons
*/
name: string;
/**
* Size of the icon. Controls both font size and optical size
* @values small, medium, large
*/
size?: 'small' | 'medium' | 'large';
/**
* Weight of the icon. Similar to font-weight
* @values 100, 200, 300, 400, 500, 600, 700
*/
weight?: number;
}
Expand Down

0 comments on commit c2aae34

Please sign in to comment.