@codecademy/brand 0.19.0-alpha.8d16e0b5c1.0 → 0.19.0-alpha.92a6ceeab3.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.
@@ -1,11 +1,18 @@
1
1
  import { GamutIconProps } from '@codecademy/gamut-icons';
2
- interface AppHeaderNavButtonProps {
2
+ interface AppHeaderNavButtonBaseProps {
3
3
  buttonRef: React.RefObject<HTMLButtonElement>;
4
4
  handleOnClick: (event: React.MouseEvent) => void;
5
5
  isOpen: boolean;
6
6
  title?: string;
7
- icon?: React.ComponentType<GamutIconProps>;
7
+ }
8
+ interface AppHeaderTextNavButtonProps extends AppHeaderNavButtonBaseProps {
9
+ icon?: undefined;
10
+ isIconOnly?: undefined;
11
+ }
12
+ interface AppHeaderIconNavButtonProps extends AppHeaderNavButtonBaseProps {
13
+ icon: React.ComponentType<GamutIconProps>;
8
14
  isIconOnly?: boolean;
9
15
  }
16
+ type AppHeaderNavButtonProps = AppHeaderTextNavButtonProps | AppHeaderIconNavButtonProps;
10
17
  export declare const AppHeaderDropdownNavButton: React.FC<AppHeaderNavButtonProps>;
11
18
  export {};
@@ -20,8 +20,6 @@ export const AppHeaderNavButton = _ref => {
20
20
  return /*#__PURE__*/_jsx(AppHeaderDropdownNavButton, {
21
21
  buttonRef: buttonRef,
22
22
  handleOnClick: handleOnClick,
23
- icon: item.icon,
24
- isIconOnly: item.isIconOnly,
25
23
  isOpen: isOpen,
26
24
  title: item.text
27
25
  });
@@ -9,6 +9,10 @@ type AppHeaderBaseItem<Type extends string> = {
9
9
  redirect?: boolean;
10
10
  type: Type;
11
11
  };
12
+ type AppHeaderIconButtonItem = AppHeaderBaseItem<'dropdown'> & {
13
+ icon?: React.ComponentType<GamutIconProps>;
14
+ isIconOnly?: boolean;
15
+ };
12
16
  type AppHeaderBaseHrefItem<Type extends string> = AppHeaderBaseItem<Type> & {
13
17
  href: string;
14
18
  trackingTarget: string;
@@ -34,12 +38,10 @@ export type AppHeaderFillButtonItem = AppHeaderBaseHrefItem<'fill-button'> & Pic
34
38
  text: string;
35
39
  };
36
40
  export type AppHeaderDropdownItem = AppHeaderSimpleDropdownItem | AppHeaderProfileDropdownItem | AppHeaderResourcesSimpleDropdownItem;
37
- export type AppHeaderSimpleDropdownItem = AppHeaderBaseItem<'dropdown'> & {
38
- icon?: React.ComponentType<GamutIconProps>;
41
+ export type AppHeaderSimpleDropdownItem = AppHeaderBaseItem<'dropdown'> & AppHeaderIconButtonItem & {
39
42
  popover: AppHeaderLinkItem[];
40
43
  text: string;
41
44
  trackingTarget: string;
42
- isIconOnly?: boolean;
43
45
  };
44
46
  export type AppHeaderProfileDropdownItem = AppHeaderBaseItem<'profile-dropdown'> & {
45
47
  avatar: string;
@@ -69,7 +71,6 @@ export type AppHeaderResourcesSimpleDropdownItem = AppHeaderBaseItem<'resources-
69
71
  trackingTarget: string;
70
72
  hideCareerPaths?: boolean;
71
73
  popover: AppHeaderLinkItem[];
72
- isIconOnly?: boolean;
73
74
  };
74
75
  export type AppHeaderClickHandler<ItemType = AppHeaderItem> = (event: React.MouseEvent, item: ItemType) => void;
75
76
  export type AppHeaderAction = {
@@ -1,5 +1,4 @@
1
1
  import { LogoLXStudio } from '../../../index';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
2
  const meta = {
4
3
  args: {
5
4
  height: 40
@@ -8,8 +7,5 @@ const meta = {
8
7
  };
9
8
  export default meta;
10
9
  export const Default = {
11
- render: args => /*#__PURE__*/_jsx(LogoLXStudio, {
12
- ...args
13
- }),
14
- name: 'LogoFromSkillsoft'
10
+ args: {}
15
11
  };
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": "0.19.0-alpha.8d16e0b5c1.0",
4
+ "version": "0.19.0-alpha.92a6ceeab3.0",
5
5
  "author": "Codecademy Engineering <dev@codecademy.com>",
6
6
  "dependencies": {
7
7
  "@emotion/is-prop-valid": "^1.2.1",