Skip to content

Commit 22bf237

Browse files
adjustment title and remove HelloWorld component
1 parent be7a3b8 commit 22bf237

File tree

5 files changed

+40
-56
lines changed

5 files changed

+40
-56
lines changed

docs/src/App.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
22
import pkg from '../../package.json';
3-
import HelloWorld from './components/HelloWorld.vue'
3+
import Title from './components/Title.vue'
44
import VueTechsLogos from 'vue-techs-logos'
55
import DarkModeVue from 'darkmode-vue'
66
@@ -12,7 +12,7 @@ const appVersion: string = pkg.version;
1212
<DarkModeVue class="darkmode-button" :hiddenLabel="true"/>
1313
<img alt="Vue logo" class="logo" src="./assets/logo.svg" width="125" height="125" />
1414
<div class="wrapper">
15-
<HelloWorld :msg="`vue-techs-logos@${appVersion}`" />
15+
<Title :title="`vue-techs-logos@${appVersion}`" />
1616
<div class="code-content">
1717
<div>
1818
<h1>Install</h1>

docs/src/components/HelloWorld.vue

Lines changed: 0 additions & 43 deletions
This file was deleted.

docs/src/components/Title.vue

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<script setup lang="ts">
2+
defineProps<{
3+
title: string
4+
}>()
5+
</script>
6+
7+
<template>
8+
<div class="title">
9+
<h1 class="green">{{ title }}</h1>
10+
</div>
11+
</template>
12+
13+
<style scoped>
14+
h1 {
15+
font-size: 2rem;
16+
top: -10px;
17+
text-align: center;
18+
}
19+
20+
@media (min-width: 1024px) {
21+
h1 {
22+
font-weight: 500;
23+
font-size: 2.8rem;
24+
text-align: left;
25+
}
26+
}
27+
</style>

docs/src/components/__tests__/HelloWorld.spec.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { describe, it, expect } from 'vitest'
2+
3+
import { mount } from '@vue/test-utils'
4+
import Title from '../Title.vue'
5+
6+
describe('Title', () => {
7+
it('renders properly', () => {
8+
const wrapper = mount(Title, { props: { title: 'VueTechsLogos' } })
9+
expect(wrapper.text()).toContain('VueTechsLogos')
10+
})
11+
})

0 commit comments

Comments
 (0)