@royaloperahouse/chord 0.7.48 → 0.7.49

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 { ReactNode, AnchorHTMLAttributes, MouseEventHandler } from 'react';
2
2
  import { IconNameType, DirectionType } from './iconTypes';
3
3
  import { Colors } from './types';
4
+ export declare enum ButtonType {
5
+ Primary = "Primary",
6
+ Secondary = "Secondary",
7
+ Tertiary = "Tertiary"
8
+ }
4
9
  export interface IButtonProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
5
10
  children: ReactNode;
6
11
  /**
@@ -1,5 +1,5 @@
1
1
  import { StyledProps } from 'styled-components';
2
- import { PromoLinks } from '../types/editorial';
2
+ import { PromoLinks } from './editorial';
3
3
  export interface ICardProps {
4
4
  /**
5
5
  * The progress percentage
@@ -33,7 +33,6 @@ export interface ICardProps {
33
33
  * Image to render
34
34
  */
35
35
  image?: string;
36
- /**
37
36
  /**
38
37
  * Image alt text
39
38
  */
@@ -46,6 +45,14 @@ export interface ICardProps {
46
45
  * Set if content gets full width (same as image)
47
46
  */
48
47
  fullWidth?: boolean;
48
+ /**
49
+ * Defines if buttons are hidden; True by default;
50
+ */
51
+ onlyShowButtonsOnHover?: boolean;
52
+ /**
53
+ * A callback to be called when the
54
+ */
55
+ onClick?: VoidFunction;
49
56
  }
50
57
  export interface ICardContentContainerProps extends StyledProps<any> {
51
58
  /**
@@ -76,4 +83,8 @@ export interface ICardButtonContainerProps {
76
83
  * Set the length of tertiary button text
77
84
  */
78
85
  tertiaryButtonTextLength: number;
86
+ /**
87
+ * Hides buttons by default using opacity; shows buttons on
88
+ */
89
+ onlyShowButtonsOnHover?: boolean;
79
90
  }
@@ -1,5 +1,6 @@
1
1
  import { AnchorHTMLAttributes, MouseEventHandler, ReactElement, ReactNode } from 'react';
2
2
  import { StyledProps } from 'styled-components';
3
+ import { ButtonType } from './buttonTypes';
3
4
  import { DirectionType, IconNameType } from './iconTypes';
4
5
  import { Colors, Image } from './types';
5
6
  export interface IEditorialProps {
@@ -73,6 +74,10 @@ export declare type EditorialLink = AnchorHTMLAttributes<HTMLAnchorElement> & {
73
74
  * background color
74
75
  */
75
76
  bgColor?: Colors;
77
+ /**
78
+ * type of the button to be rendered; When not passed the Primary and Tetriary are displayed by default;
79
+ */
80
+ buttonType?: ButtonType;
76
81
  };
77
82
  export declare type PromoLinks = [EditorialLink, EditorialLink?];
78
83
  export interface IPromoWithTitleProps {
@@ -5,4 +5,6 @@ import { CarouselType } from './carousel';
5
5
  import { IconNameType } from './iconTypes';
6
6
  import { AspectRatio } from './image';
7
7
  import { TickboxMode } from './tickbox';
8
- export { AspectRatio, CarouselType, Colors, FooterData, IconNameType, INavigationProps, INavTopProps, TickboxMode, ThemeType, };
8
+ import { ButtonType } from './buttonTypes';
9
+ import { EditorialLink } from './editorial';
10
+ export { AspectRatio, ButtonType, CarouselType, Colors, EditorialLink, FooterData, IconNameType, INavigationProps, INavTopProps, TickboxMode, ThemeType, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@royaloperahouse/chord",
3
- "version": "0.7.48",
3
+ "version": "0.7.49",
4
4
  "author": "Royal Opera House",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",