feat(ui): rename TagStatus to MachineStatus
Standardizes naming and updates related props, classes, and types for clarity and consistency.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
span.tag-status {
|
span.machine-status {
|
||||||
@apply flex items-center gap-1;
|
@apply flex items-center gap-1;
|
||||||
|
|
||||||
.indicator {
|
.indicator {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import {
|
import {
|
||||||
MachineStatus,
|
MachineStatus,
|
||||||
TagStatusProps,
|
MachineStatusProps,
|
||||||
} from "@/src/components/v2/MachineStatus/MachineStatus";
|
} from "@/src/components/v2/MachineStatus/MachineStatus";
|
||||||
import { Meta, StoryObj } from "@kachurun/storybook-solid";
|
import { Meta, StoryObj } from "@kachurun/storybook-solid";
|
||||||
|
|
||||||
const meta: Meta<TagStatusProps> = {
|
const meta: Meta<MachineStatusProps> = {
|
||||||
title: "Components/MachineStatus",
|
title: "Components/MachineStatus",
|
||||||
component: MachineStatus,
|
component: MachineStatus,
|
||||||
decorators: [
|
decorators: [
|
||||||
@@ -18,7 +18,7 @@ const meta: Meta<TagStatusProps> = {
|
|||||||
|
|
||||||
export default meta;
|
export default meta;
|
||||||
|
|
||||||
type Story = StoryObj<TagStatusProps>;
|
type Story = StoryObj<MachineStatusProps>;
|
||||||
|
|
||||||
export const Online: Story = {
|
export const Online: Story = {
|
||||||
args: {
|
args: {
|
||||||
|
|||||||
@@ -12,14 +12,14 @@ export type MachineStatus =
|
|||||||
| "Installed"
|
| "Installed"
|
||||||
| "Not Installed";
|
| "Not Installed";
|
||||||
|
|
||||||
export interface TagStatusProps {
|
export interface MachineStatusProps {
|
||||||
label?: boolean;
|
label?: boolean;
|
||||||
status: MachineStatus;
|
status: MachineStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const MachineStatus = (props: TagStatusProps) => (
|
export const MachineStatus = (props: MachineStatusProps) => (
|
||||||
<Badge
|
<Badge
|
||||||
class={cx("tag-status", {
|
class={cx("machine-status", {
|
||||||
online: props.status == "Online",
|
online: props.status == "Online",
|
||||||
offline: props.status == "Offline",
|
offline: props.status == "Offline",
|
||||||
installed: props.status == "Installed",
|
installed: props.status == "Installed",
|
||||||
|
|||||||
Reference in New Issue
Block a user