Skip to content

Commit

Permalink
Merge pull request #899 from oslokommune/drag-n-drop-icon
Browse files Browse the repository at this point in the history
Add drag & drop indicator icon
  • Loading branch information
simenheg authored Oct 19, 2023
2 parents 5503836 + 2dd7536 commit 11eeda2
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 19 deletions.
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"node": "18"
},
"dependencies": {
"@oslokommune/punkt-vue2": "^5.1.21",
"@oslokommune/punkt-vue2": "^9.2.6",
"d3": "^7.6.1",
"d3-array": "^3.1.1",
"d3-axis": "^3.0.0",
Expand Down Expand Up @@ -68,7 +68,7 @@
"@babel/eslint-parser": "7.16.5",
"@babel/preset-env": "^7.16.5",
"@firebase/rules-unit-testing": "^2.0.7",
"@oslokommune/punkt-css": "^5.1.19",
"@oslokommune/punkt-css": "^9.2.6",
"@vitejs/plugin-vue2": "^2.2.0",
"env-cmd": "^10.1.0",
"esbuild": "^0.15.14",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Navigation/header/OrganizationSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default {
&__item {
gap: 0.25rem;
align-items: center;
margin: 0.5rem 1.25rem;
margin: 0.6875rem 1.25rem;
.pkt-form-check-input {
width: 1rem;
Expand Down
20 changes: 19 additions & 1 deletion src/components/widgets/WidgetKpiCard/WidgetKpiCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
:title="kpi.name"
:class="['kpi-card-widget', { 'kpi-card-widget--compact': compact }]"
>
<template v-if="hasEditRights" #title-actions>
<pkt-icon class="drag-icon" name="drag" />
</template>

<div class="kpi-card-widget__inner">
<div class="kpi-card-widget__trend">
<period-trend-tag
Expand Down Expand Up @@ -33,7 +37,7 @@
</template>

<script>
import { mapState } from 'vuex';
import { mapGetters, mapState } from 'vuex';
import {
filterDuplicatedProgressValues,
formatKPIValue,
Expand Down Expand Up @@ -74,6 +78,7 @@ export default {
computed: {
...mapState(['selectedPeriod']),
...mapGetters(['hasEditRights']),
progress() {
return filterDuplicatedProgressValues(this.progressCollection);
Expand Down Expand Up @@ -159,6 +164,19 @@ export default {
max-width: 50%;
}
::v-deep .widget__header {
align-items: flex-start;
}
.drag-icon {
--fg-color: var(--color-grayscale-30);
::v-deep svg {
height: 0.875rem;
min-height: 0.875rem;
}
}
.no-data {
flex: 1;
align-self: center;
Expand Down
1 change: 0 additions & 1 deletion src/styles/_forms.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
flex-direction: column;
gap: 0;
align-items: flex-start;
margin-top: 0.15rem;
font-weight: 300;

.description {
Expand Down
4 changes: 4 additions & 0 deletions src/styles/main.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@use '@oslokommune/punkt-css/dist/scss/abstracts/variables' with (
$font-path: '@oslokommune/punkt-assets/dist'
);

@use 'reset';
@use 'widgets';
@use 'nav';
Expand Down

0 comments on commit 11eeda2

Please sign in to comment.