131 lines
2.8 KiB
Vue
131 lines
2.8 KiB
Vue
<template>
|
|
<section :class="['data', darkMode ? 'section-darkmode' : 'section-lightmode']">
|
|
<table class="data-table" id="customer-table">
|
|
<tbody>
|
|
<tr :class="['table-row', darkMode ? 'tr-head-darkmode' : 'tr-head-lightmode']" id="table-head">
|
|
<th
|
|
:class="['ID', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'ID-darkmode' : 'ID-lightmode']">
|
|
ID
|
|
</th>
|
|
<th
|
|
:class="['Name', darkMode ? 'th-darkmode' : 'th-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
|
|
Name</th>
|
|
</tr>
|
|
<tr :class="['table-row', darkMode ? 'tr-darkmode' : 'tr-lightmode']" id="row-1">
|
|
<td
|
|
:class="['ID', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'ID-darkmode' : 'ID-lightmode']">
|
|
...</td>
|
|
<td
|
|
:class="['Name', darkMode ? 'td-darkmode' : 'td-lightmode', darkMode ? 'Name-darkmode' : 'Name-lightmode']">
|
|
...</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
import { ref } from 'vue';
|
|
|
|
const darkMode = ref(true)
|
|
</script>
|
|
|
|
<script>
|
|
export default {
|
|
name: "CustomerTable",
|
|
};
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
.data {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
justify-content: center;
|
|
align-self: stretch;
|
|
width: 100%;
|
|
padding: 1.25rem 1.875rem;
|
|
gap: 1.25rem;
|
|
border-radius: 0.625rem;
|
|
box-shadow: 0.25rem 0.25rem 0.25rem 0rem rgba(0, 0, 0, 0.25);
|
|
}
|
|
|
|
.section-darkmode {
|
|
background-color: #2c2c2c;
|
|
}
|
|
|
|
.section-lightmode {
|
|
background-color: #ffffff;
|
|
}
|
|
|
|
.data-table {
|
|
width: 100%;
|
|
padding: 0 0.625rem;
|
|
table-layout: fixed;
|
|
border-collapse: collapse;
|
|
}
|
|
|
|
.table-row {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
height: 3.125rem;
|
|
padding: 0.625rem;
|
|
gap: 0.625rem;
|
|
}
|
|
|
|
.tr-head-darkmode {
|
|
border-top: none;
|
|
border-bottom: 0.0625rem solid #000000;
|
|
}
|
|
|
|
.tr-head-lightmode {
|
|
border-top: none;
|
|
border-bottom: 0.0625rem solid #8e8e8e;
|
|
}
|
|
|
|
.tr-darkmode {
|
|
border-top: 0.0625rem solid #000000;
|
|
}
|
|
|
|
.tr-lightmode {
|
|
border-top: 0.0625rem solid #8e8e8e;
|
|
}
|
|
|
|
th, td {
|
|
height: 1.875rem;
|
|
text-align: left;
|
|
padding: 0;
|
|
letter-spacing: 5%;
|
|
font: 400 0.875rem/1.875rem Overpass, sans-serif;
|
|
}
|
|
|
|
.th-darkmode, .td-darkmode {
|
|
color: #ffffff;
|
|
}
|
|
|
|
.th-lightmode, .td-lightmode {
|
|
color: #000000;
|
|
}
|
|
|
|
th {
|
|
font: 700 0.875rem/1.875rem Overpass, sans-serif;
|
|
}
|
|
|
|
.ID {
|
|
width: 40%;
|
|
}
|
|
|
|
.ID-darkmode {
|
|
border-right: 0.0625rem solid #000000;
|
|
}
|
|
|
|
.ID-lightmode {
|
|
border-right: 0.0625rem solid #8e8e8e;
|
|
}
|
|
|
|
.Name {
|
|
width: 60%;
|
|
}</style> |