- replace all outdated flex-full utility classes with modern flex-1 across Vue components - standardize scrollbar hiding by using scrollbar-none utility instead of verbose vendor prefixes - update order detail page layout and scroll container styling - add scrollbar-none usage guidelines to AGENTS.md documentation
62 lines
1.4 KiB
Vue
62 lines
1.4 KiB
Vue
<template>
|
||
<div class="visual-action-row flex flex-items-center gap-[12px] p-[12px] bg-white rounded-18 "
|
||
:class="{ 'is-disabled': disabled }" @click="handleClick">
|
||
<div
|
||
class="visual-action-row__icon flex flex-items-center flex-justify-center w-42 h-42 rounded-14 text-[18px] font-900"
|
||
:class="toneClass">
|
||
<slot name="icon">{{ icon }}</slot>
|
||
</div>
|
||
<div class="visual-action-row__body flex-1">
|
||
<div class="visual-action-row__title color-1E293B text-[14px] font-900 truncate">{{ title }}</div>
|
||
<div v-if="subtitle" class="visual-action-row__subtitle truncate">
|
||
{{ subtitle }}
|
||
</div>
|
||
</div>
|
||
<div class="visual-action-row__arrow color-CBD5E1 font-700">›</div>
|
||
</div>
|
||
</template>
|
||
|
||
<script setup>
|
||
import { computed } from "vue";
|
||
|
||
const props = defineProps({
|
||
title: {
|
||
type: String,
|
||
default: "",
|
||
},
|
||
subtitle: {
|
||
type: String,
|
||
default: "",
|
||
},
|
||
icon: {
|
||
type: String,
|
||
default: "",
|
||
},
|
||
tone: {
|
||
type: String,
|
||
default: "green",
|
||
},
|
||
disabled: {
|
||
type: Boolean,
|
||
default: false,
|
||
},
|
||
payload: {
|
||
type: Object,
|
||
default: () => ({}),
|
||
},
|
||
});
|
||
|
||
const emit = defineEmits(["action"]);
|
||
|
||
const toneClass = computed(() => `visual-action-row__icon--${props.tone}`);
|
||
|
||
const handleClick = () => {
|
||
if (props.disabled) return;
|
||
emit("action", props.payload);
|
||
};
|
||
</script>
|
||
|
||
<style scoped lang="scss">
|
||
@import "./styles/index.scss";
|
||
</style>
|