From c9eab5916118d5b0f33b8be810d4ae5bcddbfd7e Mon Sep 17 00:00:00 2001 From: Robin Date: Mon, 30 Mar 2026 18:00:14 +0200 Subject: [PATCH] Create a StarRatingInput story --- src/icons/StarSelected.svg | 4 ++-- src/icons/StarUnselected.svg | 4 ++-- src/input/StarRatingInput.stories.tsx | 25 +++++++++++++++++++++++++ 3 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 src/input/StarRatingInput.stories.tsx diff --git a/src/icons/StarSelected.svg b/src/icons/StarSelected.svg index 69a8ce80..8004b0e4 100644 --- a/src/icons/StarSelected.svg +++ b/src/icons/StarSelected.svg @@ -1,3 +1,3 @@ - - \ No newline at end of file + + diff --git a/src/icons/StarUnselected.svg b/src/icons/StarUnselected.svg index be281947..7a28ee95 100644 --- a/src/icons/StarUnselected.svg +++ b/src/icons/StarUnselected.svg @@ -1,4 +1,4 @@ - + - \ No newline at end of file + diff --git a/src/input/StarRatingInput.stories.tsx b/src/input/StarRatingInput.stories.tsx new file mode 100644 index 00000000..9dc43480 --- /dev/null +++ b/src/input/StarRatingInput.stories.tsx @@ -0,0 +1,25 @@ +/* +Copyright 2026 Element Creations Ltd. + +SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial +Please see LICENSE in the repository root for full details. +*/ + +import { fn } from "storybook/test"; + +import type { Meta, StoryObj } from "@storybook/react-vite"; +import { StarRatingInput } from "./StarRatingInput"; + +const meta = { + component: StarRatingInput, +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +export const Default: Story = { + args: { + starCount: 5, + onChange: fn(), + }, +};