-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add foundation stories for elevation, rounded, typography
- Loading branch information
Showing
8 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import {Meta, Story} from '@storybook/vue3'; | ||
import ElevationComponent from './Elevation.vue'; | ||
|
||
export default { | ||
title: 'Foundation/Elevation', | ||
} as Meta; | ||
|
||
export const Elevation: Story = () => ({ | ||
components: {ElevationComponent}, | ||
template: `<ElevationComponent />`, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<script setup lang="ts"> | ||
import defaultTheme from 'tailwindcss/defaultTheme'; | ||
</script> | ||
|
||
<template> | ||
<h1 class="text-3xl font-bold mb-5">Elevation</h1> | ||
<div class="grid grid-cols-2 sm:grid-cols-4 gap-4"> | ||
<template v-for="(shadow, name) in defaultTheme.boxShadow" :key="name"> | ||
<div :style="{boxShadow: shadow}" class="rounded-xl p-6 border bg-white"> | ||
<div class="mb-2 font-semibold"> | ||
{{ name === 'DEFAULT' ? 'shadow' : `shadow-${name}` }} | ||
</div> | ||
<code class="text-mono text-xs">{{ shadow }}</code> | ||
</div> | ||
</template> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import {Meta, Story} from '@storybook/vue3'; | ||
import RoundedComponent from './Rounded.vue'; | ||
|
||
export default { | ||
title: 'Foundation/Rounded', | ||
} as Meta; | ||
|
||
export const Rounded: Story = () => ({ | ||
components: {RoundedComponent}, | ||
template: `<RoundedComponent />`, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<script setup lang="ts"> | ||
import defaultTheme from 'tailwindcss/defaultTheme'; | ||
</script> | ||
|
||
<template> | ||
<h1 class="text-3xl font-bold mb-5">Rounded</h1> | ||
<div class="grid grid-cols-2 sm:grid-cols-4 gap-4"> | ||
<div | ||
v-for="(rounded, name) in defaultTheme.borderRadius" | ||
:key="name" | ||
:style="{borderRadius: rounded}" | ||
class="p-6 border-2 text-center bg-white" | ||
> | ||
<div class="font-semibold mb-3"> | ||
{{ name === 'DEFAULT' ? 'rounded' : `rounded-${name}` }} | ||
</div> | ||
<code>{{ rounded }}</code> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import {Meta, Story} from '@storybook/vue3'; | ||
import TypographyComponent from './Typography.vue'; | ||
|
||
export default { | ||
title: 'Foundation/Typography', | ||
} as Meta; | ||
|
||
export const Typography: Story = () => ({ | ||
components: {TypographyComponent}, | ||
template: `<TypographyComponent />`, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<script setup lang="ts"> | ||
import defaultTheme from 'tailwindcss/defaultTheme'; | ||
</script> | ||
|
||
<template> | ||
<h1 class="text-3xl font-bold mb-5">Typography</h1> | ||
<div class="space-y-5 divide-y"> | ||
<div v-for="(size, name) in defaultTheme.fontSize" :key="name" class="pt-4"> | ||
<div> | ||
<div class="font-semibold text-lg">{{ `text-${name}` }}</div> | ||
|
||
<ul class="font-mono text-xs mt-1"> | ||
<li>Font size: {{ size[0] }}</li> | ||
<li>Line height: {{ size[1] }}</li> | ||
</ul> | ||
</div> | ||
<p | ||
class="border-2 rounded-xl p-4 mt-4" | ||
:style="{fontSize: size[0], lineHeight: size[1]}" | ||
> | ||
Lorem ipsum dolor sit amet consectetur, adipisicing elit | ||
</p> | ||
</div> | ||
</div> | ||
</template> |