ymy-components 0.0.33 → 0.0.35
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.
- package/dist/buttons/BannerButton.types.d.ts +5 -0
- package/dist/collections/ListItem.d.ts +4 -6
- package/dist/components/ToggleSwitch.d.ts +8 -0
- package/dist/index.cjs.js +89 -35
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +868 -781
- package/package.json +1 -1
|
@@ -39,4 +39,9 @@ export type BannerButtonProps = {
|
|
|
39
39
|
* Defaults to 'simplified' if not specified.
|
|
40
40
|
*/
|
|
41
41
|
characterPreference?: CharacterPreference;
|
|
42
|
+
/**
|
|
43
|
+
* Whether to animate the text translation.
|
|
44
|
+
* Defaults to true if not specified.
|
|
45
|
+
*/
|
|
46
|
+
animate?: boolean;
|
|
42
47
|
};
|
|
@@ -4,18 +4,16 @@ export declare const PrimaryIcons: {
|
|
|
4
4
|
readonly sunny: import('react-icons/lib').IconType;
|
|
5
5
|
readonly character: () => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
};
|
|
7
|
-
export declare const SecondaryIcons: {
|
|
8
|
-
readonly chevron: import('react-icons/lib').IconType;
|
|
9
|
-
readonly switch: import('react-icons/lib').IconType;
|
|
10
|
-
};
|
|
11
7
|
export type PrimaryIconName = keyof typeof PrimaryIcons;
|
|
12
|
-
export type SecondaryIconName =
|
|
8
|
+
export type SecondaryIconName = 'chevron' | 'switch';
|
|
13
9
|
interface ListItemProps {
|
|
14
10
|
icon: PrimaryIconName;
|
|
15
11
|
text: string;
|
|
16
12
|
actionIcon?: SecondaryIconName;
|
|
17
13
|
onClick?: () => void;
|
|
18
14
|
styles?: React.CSSProperties;
|
|
15
|
+
switchChecked?: boolean;
|
|
16
|
+
onSwitchChange?: (checked: boolean) => void;
|
|
19
17
|
}
|
|
20
|
-
export declare const ListItem: ({ icon, text, actionIcon, onClick, styles, }: ListItemProps) => ReactElement;
|
|
18
|
+
export declare const ListItem: ({ icon, text, actionIcon, onClick, styles, switchChecked, onSwitchChange, }: ListItemProps) => ReactElement;
|
|
21
19
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface ToggleSwitchProps {
|
|
2
|
+
checked?: boolean;
|
|
3
|
+
defaultChecked?: boolean;
|
|
4
|
+
onChange?: (checked: boolean) => void;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const ToggleSwitch: ({ checked: controlledChecked, defaultChecked, onChange, disabled, }: ToggleSwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default ToggleSwitch;
|