UI Components
UI Components
Section titled “UI Components”Generic, reusable UI components located in src/components/common/.
Available Components
Section titled “Available Components”| Component | Description | Documentation |
|---|---|---|
| TruncateText | Text truncation with tooltip | View |
| HeaderView | Page header component | View |
| TitleHeader | Section title header | View |
| CustomToggle | Custom toggle switch | View |
| GitBranch | Git branch display | View |
TruncateText
Section titled “TruncateText”Truncates long text with ellipsis and optional tooltip.
<template> <TruncateText :text="longText" :max-length="50" show-tooltip /></template>
<script setup lang="ts">import TruncateText from '@/components/common/TruncateText.vue';
const longText = 'This is a very long text that needs to be truncated...';</script>| Prop | Type | Default | Description |
|---|---|---|---|
text | string | required | Text to display |
maxLength | number | 100 | Maximum characters |
showTooltip | boolean | true | Show full text on hover |
HeaderView
Section titled “HeaderView”Page header with title, description, and actions slot.
<template> <HeaderView title="Flows" description="Manage your automation flows" > <template #actions> <Button label="Create Flow" /> </template> </HeaderView></template>| Prop | Type | Default | Description |
|---|---|---|---|
title | string | required | Page title |
description | string | '' | Page description |
| Slot | Props | Description |
|---|---|---|
actions | - | Action buttons |
TitleHeader
Section titled “TitleHeader”Section title with optional icon and action.
<template> <TitleHeader title="Settings" icon="pi pi-cog" /></template>| Prop | Type | Default | Description |
|---|---|---|---|
title | string | required | Section title |
icon | string | '' | PrimeIcons class |
CustomToggle
Section titled “CustomToggle”Custom styled toggle switch (wrapper around PrimeVue ToggleSwitch).
<template> <CustomToggle v-model="isEnabled" label="Enable feature" /></template>
<script setup lang="ts">const isEnabled = ref(false);</script>| Prop | Type | Default | Description |
|---|---|---|---|
modelValue | boolean | false | Toggle state |
label | string | '' | Label text |
disabled | boolean | false | Disabled state |
| Event | Payload | Description |
|---|---|---|
update:modelValue | boolean | State change |
GitBranch
Section titled “GitBranch”Displays git branch name with icon.
<template> <GitBranch branch="feature/new-flow" /></template>| Prop | Type | Default | Description |
|---|---|---|---|
branch | string | required | Branch name |
Creating New UI Components
Section titled “Creating New UI Components”Use the component template when creating new UI components.
Checklist
Section titled “Checklist”- Props are typed
- Emits are typed
- Unit tests are added
- Documentation is updated
- Follows naming conventions