docs: Updated typography docs

This commit is contained in:
Ilya Artamonov
2023-09-19 13:20:42 +03:00
parent 7fd3b4f3a6
commit dff5174312
14 changed files with 71 additions and 43 deletions

View File

@@ -17,6 +17,8 @@ import HCustom from './typography/heading/HCustom.vue'
Use the `tag="h1"` as the most important text element to indicate the title of your web page.
<H1 />
```vue
<template>
<Heading tag="h1">This is my heading</Heading>
@@ -27,12 +29,13 @@ import Heading from 'flowbite-vue'
</script>
```
<H1 />
## Heading one (H2)
The H2 tag can be used as subtitles of the pages sections.
<H2 />
```vue
<template>
<Heading tag="h2">This is my heading</Heading>
@@ -43,12 +46,13 @@ import Heading from 'flowbite-vue'
</script>
```
<H2 />
## Heading one (H3)
Use the H3 tags inside sections that already have a H2 available.
<H3 />
```vue
<template>
<Heading tag="h3">This is my heading</Heading>
@@ -59,12 +63,13 @@ import Heading from 'flowbite-vue'
</script>
```
<H3 />
## Heading one (H4)
The H4 can be generally used after H2 and H3 tags are already present and you need a more in-depth hierarchy.
<H4 />
```vue
<template>
<Heading tag="h4">This is my heading</Heading>
@@ -75,12 +80,13 @@ import Heading from 'flowbite-vue'
</script>
```
<H4 />
## Heading one (H5)
The H5 tag is most often used in longer articles with other heading already available or in sidebars.
<H5 />
```vue
<template>
<Heading tag="h5">This is my heading</Heading>
@@ -91,12 +97,13 @@ import Heading from 'flowbite-vue'
</script>
```
<H5 />
## Heading one (H6)
Using the H6 tag is quite rare because it means that youve already used all heading from H1 to H5, but you can still use it if you have a very complex article with lots of headings.
<H6 />
```vue
<template>
<Heading tag="h6">This is my heading</Heading>
@@ -107,12 +114,13 @@ import Heading from 'flowbite-vue'
</script>
```
<H6 />
## Color
Use the `color` prop to set the text color.
<HColor />
```vue
<template>
<Heading color="text-green-400" tag="h1">This is my heading</Heading>
@@ -123,12 +131,13 @@ import Heading from 'flowbite-vue'
</script>
```
<HColor />
## Custom classes
Use the `class` attribute to apply the tailwind classes.
<HCustom />
```vue
<template>
<Heading class="!text-xl italic underline" tag="h1">This is my heading</Heading>
@@ -139,4 +148,4 @@ import Heading from 'flowbite-vue'
</script>
```
<HCustom />