From 28ac7a436effccfc2a36024caa65695527637d0c Mon Sep 17 00:00:00 2001 From: Aaron Chong Date: Thu, 5 Dec 2024 10:36:55 +0800 Subject: [PATCH] robot-summary Signed-off-by: Aaron Chong --- .../robots/robot-summary.stories.tsx | 31 +++++++++++++++++++ .../components/robots/robot-summary.test.tsx | 0 2 files changed, 31 insertions(+) create mode 100644 packages/rmf-dashboard-framework/src/components/robots/robot-summary.stories.tsx create mode 100644 packages/rmf-dashboard-framework/src/components/robots/robot-summary.test.tsx diff --git a/packages/rmf-dashboard-framework/src/components/robots/robot-summary.stories.tsx b/packages/rmf-dashboard-framework/src/components/robots/robot-summary.stories.tsx new file mode 100644 index 000000000..d4f5fce2d --- /dev/null +++ b/packages/rmf-dashboard-framework/src/components/robots/robot-summary.stories.tsx @@ -0,0 +1,31 @@ +import { Meta, StoryObj } from '@storybook/react'; + +import { ApiServerModelsRmfApiRobotStateStatus as Status } from 'api-client'; +import { RobotSummary } from './robot-summary'; + +export default { + title: 'Robots/RobotSummary', + component: RobotSummary, +} satisfies Meta; + +type Story = StoryObj; + +export const Default: Story = { + args: { + onClose: () => {}, + robot: { + fleet: 'test_fleet', + name: 'test_robot', + status: Status.Idle, + battery: 60, + estFinishTime: 1000000, + lastUpdateTime: 900000, + level: 'L1', + commission: { + dispatch_tasks: true, + direct_tasks: true, + idle_behavior: true, + }, + }, + }, +}; diff --git a/packages/rmf-dashboard-framework/src/components/robots/robot-summary.test.tsx b/packages/rmf-dashboard-framework/src/components/robots/robot-summary.test.tsx new file mode 100644 index 000000000..e69de29bb