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;
|
||||
|
||||
.indicator {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import {
|
||||
MachineStatus,
|
||||
TagStatusProps,
|
||||
MachineStatusProps,
|
||||
} from "@/src/components/v2/MachineStatus/MachineStatus";
|
||||
import { Meta, StoryObj } from "@kachurun/storybook-solid";
|
||||
|
||||
const meta: Meta<TagStatusProps> = {
|
||||
const meta: Meta<MachineStatusProps> = {
|
||||
title: "Components/MachineStatus",
|
||||
component: MachineStatus,
|
||||
decorators: [
|
||||
@@ -18,7 +18,7 @@ const meta: Meta<TagStatusProps> = {
|
||||
|
||||
export default meta;
|
||||
|
||||
type Story = StoryObj<TagStatusProps>;
|
||||
type Story = StoryObj<MachineStatusProps>;
|
||||
|
||||
export const Online: Story = {
|
||||
args: {
|
||||
|
||||
@@ -12,14 +12,14 @@ export type MachineStatus =
|
||||
| "Installed"
|
||||
| "Not Installed";
|
||||
|
||||
export interface TagStatusProps {
|
||||
export interface MachineStatusProps {
|
||||
label?: boolean;
|
||||
status: MachineStatus;
|
||||
}
|
||||
|
||||
export const MachineStatus = (props: TagStatusProps) => (
|
||||
export const MachineStatus = (props: MachineStatusProps) => (
|
||||
<Badge
|
||||
class={cx("tag-status", {
|
||||
class={cx("machine-status", {
|
||||
online: props.status == "Online",
|
||||
offline: props.status == "Offline",
|
||||
installed: props.status == "Installed",
|
||||
|
||||
Reference in New Issue
Block a user