1. Renames color names in palette. Using names such as "primary" and
"secondary" that are in consistent with designs such as material,
bootstrap and metro UI palettes. It adds `color-` prefix on color
variables in line with Vue Design System.
2. Introduces necessary changes to follow the system color system
everywhere without using any other color:
- It changes tooltip background from black to darker primary
colors.
- It overrides unset styles from tree component
- It ensures footer has same color as top menu.
3. Removes opacity CSS changes to have better control on choices. To
achieve that:
- It introduces new "light" variants of main colors
- It switches to colors with different variants (e.g. in Dialogs it
uses primary color as button as it has variants that can be
activated on hover meanwhile on-surface color is single).
4. Styles a tags (anchor elements) globally for consistency
69 lines
1.4 KiB
Vue
69 lines
1.4 KiB
Vue
<template>
|
|
<button class="button" @click="onClicked">
|
|
<font-awesome-icon
|
|
class="button__icon"
|
|
:icon="[iconPrefix, iconName]" size="2x" />
|
|
<div class="button__text">{{text}}</div>
|
|
</button>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { Component, Prop, Emit, Vue } from 'vue-property-decorator';
|
|
|
|
@Component
|
|
export default class IconButton extends Vue {
|
|
@Prop() public text!: number;
|
|
@Prop() public iconPrefix!: string;
|
|
@Prop() public iconName!: string;
|
|
|
|
@Emit('click')
|
|
public onClicked() {
|
|
return;
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
@import "@/presentation/styles/colors.scss";
|
|
@import "@/presentation/styles/fonts.scss";
|
|
|
|
.button {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
|
|
background-color: $color-secondary;
|
|
color: $color-on-secondary;
|
|
|
|
border: none;
|
|
padding:20px;
|
|
transition-duration: 0.4s;
|
|
overflow: hidden;
|
|
box-shadow: 0 3px 9px $color-primary-darkest;
|
|
border-radius: 4px;
|
|
|
|
cursor: pointer;
|
|
width: 10%;
|
|
min-width: 90px;
|
|
&:hover {
|
|
background: $color-surface;
|
|
box-shadow: 0px 2px 10px 5px $color-secondary;
|
|
}
|
|
&:hover>&__text {
|
|
display: block;
|
|
}
|
|
&:hover>&__icon {
|
|
display: none;
|
|
}
|
|
&__text {
|
|
display: none;
|
|
font-family: $artistic-font;
|
|
font-size: 1.5em;
|
|
color: $color-primary;
|
|
font-weight: 500;
|
|
line-height: 1.1;
|
|
}
|
|
}
|
|
|
|
</style>
|