Files
privacy.sexy/src/presentation/components/Shared/Dialog.vue
undergroundwires bf83c58982 Refactor Saas naming, structure and modules
- Add more documentation.
- Use `main.scss` instead of importing components individually. This
  improves productivity without compilation errors due to missing
  imports and allows for easier future file/folder changes and
  refactorings inside `./styles`.
- Use partials with underscored naming. Because it documents that the
  files should not be individually imported.
- Introduce `third-party-extensions` folder to group styles that
  overwrites third party components.
- Refactor variable names from generic to specific.
- Use Sass modules (`@use` and `@forward`) over depreciated `@import`
  syntax.
- Separate font assets from Sass files (`styles/`). Create `assets/`
  folder that will contain both.
- Create `_globals.css` for global styling of common element instead of
  using `App.vue`.
2021-11-14 17:48:49 +01:00

62 lines
1.2 KiB
Vue

<template>
<modal
:name="name"
:scrollable="true"
:adaptive="true"
height="auto">
<div class="dialog">
<div class="dialog__content">
<slot></slot>
</div>
<div class="dialog__close-button">
<font-awesome-icon :icon="['fas', 'times']" @click="$modal.hide(name)"/>
</div>
</div>
</modal>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
@Component
export default class Dialog extends Vue {
private static idCounter = 0;
public name = (++Dialog.idCounter).toString();
public show(): void {
this.$modal.show(this.name);
}
}
</script>
<style scoped lang="scss">
@use "@/presentation/assets/styles/main" as *;
.dialog {
color: $color-surface;
font-family: $font-normal;
margin-bottom: 10px;
display: flex;
flex-direction: row;
&__content {
color: $color-on-surface;
width: 100%;
margin: 5%;
}
&__close-button {
color: $color-primary-dark;
width: auto;
font-size: 1.5em;
margin-right: 0.25em;
align-self: flex-start;
cursor: pointer;
&:hover {
color: $color-primary;
}
}
}
</style>