@codecademy/brand 3.38.3 → 3.39.0-alpha.347c492e1b.0

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.
@@ -7,13 +7,15 @@ export interface CoachingSessionCardProps {
7
7
  participantName?: string | null;
8
8
  zoomJoinUrl?: string | null;
9
9
  rescheduleUrl?: string | null;
10
+ status?: string | null;
10
11
  };
11
12
  ctas?: {
12
13
  text: string;
13
14
  href?: string;
14
15
  onClick?: () => void;
15
- fill?: boolean;
16
+ buttonType?: 'fill' | 'stroke' | 'text';
16
17
  disabled?: boolean;
18
+ variant?: 'primary' | 'secondary' | 'danger';
17
19
  }[];
18
20
  }
19
21
  export declare const CoachingSessionCard: React.FC<CoachingSessionCardProps>;
@@ -1,4 +1,4 @@
1
- import { Card, FillButton, FlexBox, Text, TextButton } from '@codecademy/gamut';
1
+ import { Card, FillButton, FlexBox, StrokeButton, Text, TextButton } from '@codecademy/gamut';
2
2
  import { CalendarIcon, ClockIcon } from '@codecademy/gamut-icons';
3
3
  import { formatInTimeZone } from 'date-fns-tz';
4
4
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -52,21 +52,24 @@ export const CoachingSessionCard = ({
52
52
  color: "text-secondary",
53
53
  children: `${formatTime(session.startTime, 'h:mm aa')} - ${formatTime(session.endTime, 'h:mm aa z')}`
54
54
  })]
55
+ }), session.status && /*#__PURE__*/_jsxs(Text, {
56
+ variant: "p-small",
57
+ fontWeight: "bold",
58
+ children: ["Status: ", session.status]
55
59
  })]
56
60
  }), /*#__PURE__*/_jsx(FlexBox, {
57
61
  alignItems: "center",
58
62
  gap: 8,
59
- children: ctas?.map(cta => cta.fill ? /*#__PURE__*/_jsx(FillButton, {
60
- href: cta.href,
61
- onClick: cta.onClick,
62
- disabled: cta.disabled,
63
- children: cta.text
64
- }, cta.text) : /*#__PURE__*/_jsx(TextButton, {
65
- href: cta.href,
66
- onClick: cta.onClick,
67
- disabled: cta.disabled,
68
- children: cta.text
69
- }, cta.text))
63
+ children: ctas?.map(cta => {
64
+ const Button = cta.buttonType === 'fill' ? FillButton : cta.buttonType === 'stroke' ? StrokeButton : TextButton;
65
+ return /*#__PURE__*/_jsx(Button, {
66
+ href: cta.href,
67
+ onClick: cta.onClick,
68
+ disabled: cta.disabled,
69
+ variant: cta.variant,
70
+ children: cta.text
71
+ }, cta.text);
72
+ })
70
73
  })]
71
74
  })
72
75
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@codecademy/brand",
3
3
  "description": "Brand component library for Codecademy",
4
- "version": "3.38.3",
4
+ "version": "3.39.0-alpha.347c492e1b.0",
5
5
  "author": "Codecademy Engineering <dev@codecademy.com>",
6
6
  "dependencies": {
7
7
  "@emotion/is-prop-valid": "^1.2.1",