@grantbii/design-system 1.0.42 → 1.0.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { DetailedHTMLProps, InputHTMLAttributes } from "react";
2
2
  import { Option } from "../foundations";
3
- type RadioOption = Option & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
3
+ export type RadioOption = Option & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
4
4
  type RadioButtonProps = {
5
5
  name: string;
6
6
  options: RadioOption[];
@@ -1,2 +1,2 @@
1
1
  export { default as Modal, useModal } from "./Modal";
2
- export { default as RadioButtons } from "./RadioButtons";
2
+ export { default as RadioButtons, type RadioOption } from "./RadioButtons";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grantbii/design-system",
3
- "version": "1.0.42",
3
+ "version": "1.0.43",
4
4
  "description": "Grantbii's Design System",
5
5
  "homepage": "https://design.grantbii.com",
6
6
  "repository": {
@@ -3,4 +3,5 @@ import { Meta, StoryObj } from "@storybook/nextjs-vite";
3
3
  declare const meta: Meta<typeof RadioButtons>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
- export declare const TextOnly: Story;
6
+ export declare const NoneSelectedByDefault: Story;
7
+ export declare const OneSelectedByDefault: Story;
@@ -8,7 +8,7 @@ const meta = {
8
8
  },
9
9
  };
10
10
  export default meta;
11
- export const TextOnly = {
11
+ export const NoneSelectedByDefault = {
12
12
  args: {
13
13
  name: "location ",
14
14
  options: [
@@ -25,3 +25,21 @@ export const TextOnly = {
25
25
  ],
26
26
  },
27
27
  };
28
+ export const OneSelectedByDefault = {
29
+ args: {
30
+ name: "location ",
31
+ options: [
32
+ {
33
+ label: "Singapore",
34
+ value: "Singapore",
35
+ onChange: () => alert("Selected Singapore!"),
36
+ defaultChecked: true,
37
+ },
38
+ {
39
+ label: "Hong Kong",
40
+ value: "Hong Kong",
41
+ onChange: () => alert("Selected Hong Kong!"),
42
+ },
43
+ ],
44
+ },
45
+ };