mirror of
https://github.com/fleetdm/fleet
synced 2026-05-22 16:39:01 +00:00
# Details This PR merges the feature branch for the scheduled scripts UI into main. This includes the following previously-approved PRs: * https://github.com/fleetdm/fleet/pull/31750 * https://github.com/fleetdm/fleet/pull/31604 * https://github.com/fleetdm/fleet/pull/31797 # Checklist for submitter If some of the following don't apply, delete the relevant line. - [X] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/guides/committing-changes.md#changes-files) for more information. ## Testing - [X] Added/updated automated tests - [X] Where appropriate, [automated tests simulate multiple hosts and test for host isolation](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/reference/patterns-backend.md#unit-testing) (updates to one hosts's records do not affect another) - [X] QA'd all new/changed functionality manually --------- Co-authored-by: jacobshandling <61553566+jacobshandling@users.noreply.github.com> Co-authored-by: Jacob Shandling <jacob@fleetdm.com>
52 lines
1.1 KiB
TypeScript
52 lines
1.1 KiB
TypeScript
import { Meta, StoryObj } from "@storybook/react";
|
|
|
|
import ProgressBar from "./ProgressBar";
|
|
|
|
const meta: Meta<typeof ProgressBar> = {
|
|
title: "Components/ProgressBar",
|
|
component: ProgressBar,
|
|
};
|
|
|
|
export default meta;
|
|
|
|
type Story = StoryObj<typeof ProgressBar>;
|
|
|
|
export const Basic: Story = {
|
|
args: {
|
|
sections: [
|
|
{ color: "#5cb85c", portion: 0.85 },
|
|
{ color: "#d9534f", portion: 0.05 },
|
|
],
|
|
},
|
|
};
|
|
|
|
export const MultipleSegments: Story = {
|
|
args: {
|
|
sections: [
|
|
{ color: "#5cb85c", portion: 0.3 },
|
|
{ color: "#f0ad4e", portion: 0.3 },
|
|
{ color: "#d9534f", portion: 0.2 },
|
|
{ color: "#0275d8", portion: 0.1 },
|
|
],
|
|
},
|
|
};
|
|
|
|
export const SingleSegment: Story = {
|
|
args: {
|
|
sections: [{ color: "#5cb85c", portion: 0.5 }],
|
|
},
|
|
};
|
|
|
|
export const CustomBackground: Story = {
|
|
args: {
|
|
sections: [{ color: "#5cb85c", portion: 0.6 }],
|
|
backgroundColor: "#f8d7da", // Light red background
|
|
},
|
|
};
|
|
|
|
export const DefaultBackground: Story = {
|
|
args: {
|
|
sections: [{ color: "#0275d8", portion: 0.3 }],
|
|
// Uses default grey background
|
|
},
|
|
};
|