@codecademy/brand 0.13.61 → 0.14.0-alpha.2284a2813b.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,9 +1,10 @@
|
|
|
1
|
-
import { HeadingTags } from '@codecademy/gamut';
|
|
1
|
+
import { CardProps, HeadingTags } from '@codecademy/gamut';
|
|
2
2
|
export declare enum ResourceType {
|
|
3
3
|
Article = "Article",
|
|
4
|
-
Doc = "Doc"
|
|
4
|
+
Doc = "Doc",
|
|
5
|
+
Blog = "Blog"
|
|
5
6
|
}
|
|
6
|
-
export type ResourceCardProps = {
|
|
7
|
+
export type ResourceCardProps = CardProps & {
|
|
7
8
|
title: string;
|
|
8
9
|
description: string;
|
|
9
10
|
resourceType: ResourceType;
|
|
@@ -4,15 +4,17 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
export let ResourceType = /*#__PURE__*/function (ResourceType) {
|
|
5
5
|
ResourceType["Article"] = "Article";
|
|
6
6
|
ResourceType["Doc"] = "Doc";
|
|
7
|
+
ResourceType["Blog"] = "Blog"; // can be expanded for Cheatsheet, etc...
|
|
7
8
|
return ResourceType;
|
|
8
|
-
}({});
|
|
9
|
+
}({});
|
|
9
10
|
export const ResourceCard = _ref => {
|
|
10
11
|
let {
|
|
11
12
|
title,
|
|
12
13
|
description,
|
|
13
14
|
resourceType,
|
|
14
15
|
headingLevel,
|
|
15
|
-
path
|
|
16
|
+
path,
|
|
17
|
+
...cardProps
|
|
16
18
|
} = _ref;
|
|
17
19
|
const cardTitle = path ? [resourceType, ...path].join(' / ') : resourceType;
|
|
18
20
|
return /*#__PURE__*/_jsxs(Card, {
|
|
@@ -25,6 +27,7 @@ export const ResourceCard = _ref => {
|
|
|
25
27
|
shadow: "medium",
|
|
26
28
|
p: 0,
|
|
27
29
|
height: "100%",
|
|
30
|
+
...cardProps,
|
|
28
31
|
children: [/*#__PURE__*/_jsx(Box, {
|
|
29
32
|
px: 12,
|
|
30
33
|
py: 4,
|
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.
|
|
4
|
+
"version": "0.14.0-alpha.2284a2813b.0",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@emotion/is-prop-valid": "1.2.1",
|
|
@@ -46,6 +46,5 @@
|
|
|
46
46
|
"*.scss",
|
|
47
47
|
"dist/**/[A-Z]**/[A-Z]*.js",
|
|
48
48
|
"dist/**/[A-Z]**/index.js"
|
|
49
|
-
]
|
|
50
|
-
"gitHead": "42444051f93db7b9b9569472f011107a950d9e2a"
|
|
49
|
+
]
|
|
51
50
|
}
|