@codecademy/brand 2.9.0-alpha.a90d4fc0dc.0 → 2.9.0-alpha.c6e2228931.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.
@@ -6,7 +6,6 @@ import { CourseDifficulty } from '../../../ContentGroupBaseCard/types';
6
6
  import { useGlobalHeaderItemClick } from '../../../GlobalHeader/context';
7
7
  import { liveLearningHubItems, topLanguages } from '../../../lib/catalogList';
8
8
  import { AppHeaderDietCard } from '../AppHeaderDietCard';
9
- import { useAppHeaderDropdownContext } from '../AppHeaderDropdownProvider';
10
9
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
11
10
  export const CourseTopicsPanel = ({
12
11
  tabIndex = 0
@@ -240,9 +239,6 @@ const PanelLayout = ({
240
239
  const {
241
240
  globalHeaderItemClick
242
241
  } = useGlobalHeaderItemClick();
243
- const {
244
- handleClose
245
- } = useAppHeaderDropdownContext();
246
242
  return /*#__PURE__*/_jsxs(FlexBox, {
247
243
  flexDirection: "column",
248
244
  gap: 24,
@@ -259,10 +255,7 @@ const PanelLayout = ({
259
255
  children: description
260
256
  }), children, /*#__PURE__*/_jsxs(TextButton, {
261
257
  href: linkItem.href,
262
- onClick: event => {
263
- globalHeaderItemClick(event, linkItem);
264
- handleClose();
265
- },
258
+ onClick: event => globalHeaderItemClick(event, linkItem),
266
259
  tabIndex: tabIndex,
267
260
  children: [linkItem.text, " ", /*#__PURE__*/_jsx(MiniArrowRightIcon, {
268
261
  ml: 8
@@ -3,7 +3,6 @@ import { AnchorRefItemType } from '../../shared';
3
3
  export interface AppHeaderDropdownContextType {
4
4
  firstItemRef?: AnchorRefItemType;
5
5
  setFirstItemRef: Dispatch<SetStateAction<AnchorRefItemType>> | undefined;
6
- handleClose: () => void;
7
6
  }
8
7
  export declare const AppHeaderDropdownContext: React.Context<AppHeaderDropdownContextType>;
9
8
  export declare const AppHeaderDropdownProvider: React.FC<{
@@ -1,12 +1,10 @@
1
1
  import { Box } from '@codecademy/gamut';
2
- import noop from 'lodash/fp/noop';
3
2
  import React, { createContext, useContext, useState } from 'react';
4
3
  import { useOnEscHandler } from '../../shared';
5
4
  import { jsx as _jsx } from "react/jsx-runtime";
6
5
  export const AppHeaderDropdownContext = /*#__PURE__*/createContext({
7
6
  firstItemRef: undefined,
8
- setFirstItemRef: undefined,
9
- handleClose: () => noop
7
+ setFirstItemRef: undefined
10
8
  });
11
9
  export const AppHeaderDropdownProvider = ({
12
10
  children,
@@ -17,8 +15,7 @@ export const AppHeaderDropdownProvider = ({
17
15
  return /*#__PURE__*/_jsx(AppHeaderDropdownContext.Provider, {
18
16
  value: {
19
17
  firstItemRef,
20
- setFirstItemRef,
21
- handleClose
18
+ setFirstItemRef
22
19
  },
23
20
  children: /*#__PURE__*/_jsx(Box, {
24
21
  onKeyDown: onKeyDown,
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": "2.9.0-alpha.a90d4fc0dc.0",
4
+ "version": "2.9.0-alpha.c6e2228931.0",
5
5
  "author": "Codecademy Engineering <dev@codecademy.com>",
6
6
  "dependencies": {
7
7
  "@emotion/is-prop-valid": "^1.2.1",