Skip to content

Commit ce980dd

Browse files
committed
feat: adding create button component
1 parent d6a2fa6 commit ce980dd

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<template>
2+
<div class="buttons has-addons is-right">
3+
<button class="button is-success mb-4">Criar novo {{ name }}</button>
4+
</div>
5+
</template>
6+
7+
<script lang="ts">
8+
import { defineComponent } from 'vue'
9+
10+
export default defineComponent({
11+
name: 'CreateButton',
12+
props: {
13+
name: { type: String, required: true },
14+
},
15+
})
16+
</script>
17+
18+
<style scoped></style>

frontend/src/pages/ProjectsPage.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<template>
22
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@1.0.4/css/bulma.min.css" />
33
<DefaultMain :primary-text="'Projetos'" :second-text="'Organize seu trabalho em projetos'">
4+
<CreateButton :name="name" />
45
<List :list="projectsList" />
56
</DefaultMain>
67
</template>
@@ -11,16 +12,19 @@ import DefaultMain from '@/components/DefaultMain.vue'
1112
import List from '@/components/List.vue'
1213
import type { IProjects } from '@/interfaces.ts/projects.interface'
1314
import { defineComponent } from 'vue'
15+
import CreateButton from './CreateButton.vue'
1416
1517
export default defineComponent({
1618
name: 'ProjectsPage',
1719
components: {
1820
DefaultMain,
1921
List,
22+
CreateButton,
2023
},
2124
data() {
2225
return {
2326
projectsList: [] as IProjects[],
27+
name: 'projeto',
2428
}
2529
},
2630
async created() {

0 commit comments

Comments
 (0)