-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dang-1738 / add the new Typography classes (#352)
- Loading branch information
Showing
6 changed files
with
87 additions
and
13 deletions.
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,15 @@ | ||
import { | ||
Preview, | ||
Story, | ||
ArgsTable, | ||
PRIMARY_STORY, | ||
} from "@storybook/addon-docs"; | ||
import TypographyClasses from "./TypographyClasses.vue"; | ||
|
||
# Typography Classes | ||
|
||
Our font Typography classes are configured in the shared Lob Tailwind config found in the [tailwind-plugin-lob repo](https://github.com/lob/tailwind-plugin-lob). | ||
|
||
The classes are added to the theme with the use of the `addComponents` plugin. | ||
|
||
Please refer to [Tailwind's documentation](https://tailwindcss.com/docs/plugins) for more info on plugins. |
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,19 @@ | ||
import TypographyClasses from './TypographyClasses.vue'; | ||
import mdx from './TypographyClasses.mdx'; | ||
|
||
export default { | ||
title: 'Theme (Dev Only)/Typography Classes', | ||
component: TypographyClasses, | ||
parameters: { | ||
docs: { | ||
page: mdx | ||
} | ||
} | ||
}; | ||
|
||
const Template = () => ({ | ||
components: { TypographyClasses }, | ||
template: '<TypographyClasses/>' | ||
}); | ||
|
||
export const Primary = Template.bind({}); |
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,32 @@ | ||
<template> | ||
<div> | ||
<div | ||
v-for="typeClass in typeClasses" | ||
:key="typeClass" | ||
class="mb-6" | ||
> | ||
<p :class="`${typeClass}`"> | ||
{{ typeClass }} | ||
</p> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
const typeClasses = ['type-display-1', 'type-display-2', | ||
'type-header-1', 'type-header-2', 'type-header-3', 'type-header-4', | ||
'type-xl-300', 'type-xl-400', 'type-xl-500', 'type-xl-600', 'type-xl-700', 'type-xl-800', | ||
'type-large-300', 'type-large-400', 'type-large-500', 'type-large-600', 'type-large-700', 'type-large-800', | ||
'type-base-300', 'type-base-400', 'type-base-500', 'type-base-600', 'type-base-700', 'type-base-800', | ||
'type-small-300', 'type-small-400', 'type-small-500', 'type-small-600', 'type-small-700', 'type-small-800', | ||
'type-xs-300', 'type-xs-400', 'type-xs-500', 'type-xs-600', 'type-xs-700', 'type-xs-800']; | ||
export default { | ||
name: 'Theme', | ||
data () { | ||
return { | ||
typeClasses | ||
}; | ||
} | ||
}; | ||
</script> |