Skip to content

Commit c0551d5

Browse files
authored
Code samples formatting improvments (#2)
1 parent 536c802 commit c0551d5

File tree

7 files changed

+52
-47
lines changed

7 files changed

+52
-47
lines changed

content/2.components/1.html.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ import { Html, Button } from '@vue-email/components'
3939
4040
<template>
4141
<Html lang="en" dir="ltr">
42-
<Button href="https://example.com" style="color: #61dafb">
43-
Click me
44-
</Button>
45-
</Html>
42+
<Button href="https://example.com" style="color: #61dafb">
43+
Click me
44+
</Button>
45+
</Html>
4646
</template>
4747
4848
```

content/2.components/1.tailwind.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,17 @@ import { Tailwind, Button } from "@vue-email/components";
3838
</script>
3939
4040
<template>
41-
<Tailwind :config="{
41+
<Tailwind
42+
:config="{
4243
theme: {
4344
extend: {
4445
colors: {
4546
brand: '#007291',
4647
},
4748
},
4849
},
49-
}">
50+
}"
51+
>
5052
<Button href="https://example.com" class="bg-brand px-3 py-2 font-medium leading-4 text-white">
5153
Click me
5254
</Button>
@@ -70,7 +72,6 @@ One example of this is how Tailwind uses `rem` as its main unit for better acces
7072
We can’t really apply this configuration for you as it would have a few drawbacks. In the future, we will probably provide a preset to remediate this. But, for now, here’s a good starter configuration you can use to avoid these issues:
7173

7274
```ts
73-
7475
import type { TailwindConfig } from "@vue-email/tailwind";
7576

7677
export default {
@@ -129,7 +130,6 @@ export default {
129130
},
130131
},
131132
} satisfies TailwindConfig;
132-
133133
```
134134

135135
::

content/2.components/10.font.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,17 @@ import { Font, Head, Html } from "@vue-email/components";
3939
4040
<template>
4141
<Html lang="en">
42-
<Head>
43-
<Font
44-
font-family="Roboto"
45-
fallback-font-family="Verdana"
46-
:web-font="{
47-
url: 'https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2',
48-
format: 'woff2',
49-
}"
50-
:font-weight="400"
51-
font-style="normal"
52-
/>
42+
<Head>
43+
<Font
44+
font-family="Roboto"
45+
fallback-font-family="Verdana"
46+
:web-font="{
47+
url: 'https://fonts.gstatic.com/s/roboto/v27/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2',
48+
format: 'woff2',
49+
}"
50+
:font-weight="400"
51+
font-style="normal"
52+
/>
5353
</Head>
5454
</Html>
5555
</template>

content/2.components/17.section.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,21 @@ import { Section, Column, Row, Text } from "@vue-email/components";
3838
</script>
3939
4040
<template>
41-
<!-- A simple `section` -->
42-
<Section>
43-
<Text>Hello World</Text>
44-
</Section>
45-
46-
<!-- Formatted with `rows` and `columns` -->
47-
<Section>
48-
<Row>
49-
<Column>Column 1, Row 1</Column>
50-
<Column>Column 2, Row 1</Column>
51-
</Row>
52-
<Row>
53-
<Column>Column 1, Row 2</Column>
54-
<Column>Column 2, Row 2</Column>
55-
</Row>
56-
</Section>
41+
<!-- A simple `section` -->
42+
<Section>
43+
<Text>Hello World</Text>
44+
</Section>
45+
46+
<!-- Formatted with `rows` and `columns` -->
47+
<Section>
48+
<Row>
49+
<Column>Column 1, Row 1</Column>
50+
<Column>Column 2, Row 1</Column>
51+
</Row>
52+
<Row>
53+
<Column>Column 1, Row 2</Column>
54+
<Column>Column 2, Row 2</Column>
55+
</Row>
56+
</Section>
5757
</template>
5858
```

content/2.components/2.head.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import { Head } from '@vue-email/components'
4040
<template>
4141
<Head>
4242
<title>My email title</title>
43-
</Head>
43+
</Head>
4444
</template>
45-
4645
```

content/2.components/6.code-block.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,13 @@ const code = `export default async (req, res) => {
5555
</script>
5656
5757
<template>
58-
<CodeBlock :code="code" lang="typescript" theme="min-dark" show-line-numbers :highlighted-lines="[3, 4, 5]" />
58+
<CodeBlock
59+
:code="code"
60+
lang="typescript"
61+
theme="min-dark"
62+
show-line-numbers
63+
:highlighted-lines="[3, 4, 5]"
64+
/>
5965
</template>
6066
```
6167

content/2.components/9.row.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ import { Row, Column, Section } from "@vue-email/components";
4040
4141
<template>
4242
<Section>
43-
<Row>
44-
<Column>A</Column>
45-
</Row>
46-
<Row>
47-
<Column>B</Column>
48-
</Row>
49-
<Row>
50-
<Column>C</Column>
51-
</Row>
43+
<Row>
44+
<Column>A</Column>
45+
</Row>
46+
<Row>
47+
<Column>B</Column>
48+
</Row>
49+
<Row>
50+
<Column>C</Column>
51+
</Row>
5252
</Section>
5353
</template>
5454
```

0 commit comments

Comments
 (0)