@pantheon-systems/pds-toolkit-react 1.0.0-dev.183 → 1.0.0-dev.184
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,11 @@
|
|
|
1
1
|
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
import './card-select-group.css';
|
|
3
|
-
interface
|
|
3
|
+
export interface CardOption {
|
|
4
|
+
/**
|
|
5
|
+
* Unique ID for the option
|
|
6
|
+
* @default ''
|
|
7
|
+
*/
|
|
8
|
+
id?: string;
|
|
4
9
|
/**
|
|
5
10
|
* Option label
|
|
6
11
|
*/
|
|
@@ -14,15 +19,15 @@ interface CardOptions {
|
|
|
14
19
|
*/
|
|
15
20
|
value: string;
|
|
16
21
|
}
|
|
17
|
-
interface CardSelectGroupProps extends Omit<ComponentPropsWithoutRef<'fieldset'>, 'onChange'> {
|
|
22
|
+
export interface CardSelectGroupProps extends Omit<ComponentPropsWithoutRef<'fieldset'>, 'onChange'> {
|
|
18
23
|
/**
|
|
19
|
-
*
|
|
24
|
+
* Optional initial selected option value
|
|
20
25
|
*/
|
|
21
|
-
|
|
26
|
+
defaultValue?: string;
|
|
22
27
|
/**
|
|
23
|
-
*
|
|
28
|
+
* Unique ID for the card select group
|
|
24
29
|
*/
|
|
25
|
-
|
|
30
|
+
id: string;
|
|
26
31
|
/**
|
|
27
32
|
* Label for the card select group
|
|
28
33
|
*/
|
|
@@ -43,7 +48,7 @@ interface CardSelectGroupProps extends Omit<ComponentPropsWithoutRef<'fieldset'>
|
|
|
43
48
|
/**
|
|
44
49
|
* Array of card options
|
|
45
50
|
*/
|
|
46
|
-
options?:
|
|
51
|
+
options?: CardOption[];
|
|
47
52
|
/**
|
|
48
53
|
* Additional class names
|
|
49
54
|
*/
|
|
@@ -52,5 +57,4 @@ interface CardSelectGroupProps extends Omit<ComponentPropsWithoutRef<'fieldset'>
|
|
|
52
57
|
/**
|
|
53
58
|
* CardSelectGroup UI component
|
|
54
59
|
*/
|
|
55
|
-
export declare const CardSelectGroup: ({ id,
|
|
56
|
-
export {};
|
|
60
|
+
export declare const CardSelectGroup: ({ id, defaultValue, label, labelDisplay, layout, onChange, options, className, ...props }: CardSelectGroupProps) => React.JSX.Element;
|