pxt-core 7.5.28 → 7.5.31

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,32 +0,0 @@
1
- import * as React from "react";
2
-
3
-
4
- interface ExtensionCardProps extends pxt.CodeCard {
5
- scr: pxtc.service.ExtensionMeta;
6
- onCardClick: (scr: any) => void;
7
- loading?: boolean;
8
- }
9
-
10
- export const ExtensionCard = (props: ExtensionCardProps) => {
11
- const handleClick = () => {
12
- props.onCardClick(props.scr);
13
- }
14
-
15
- const handleLearnMoreClick = (e: React.MouseEvent) => {
16
- e.stopPropagation();
17
- window.open(props.learnMoreUrl, "_blank")
18
- }
19
-
20
- return <div className={(props.loading ? "loading ": "") + "ui card extensionCard"} onClick={handleClick}>
21
- <img src={props.imageUrl}/>
22
- <div className="content">
23
- <div className="name">{props.name}</div>
24
- <div className="description">{props.description}</div>
25
- </div>
26
-
27
- {props.learnMoreUrl ?
28
- <div className="extra content">
29
- <a className="learnmore" onClick={handleLearnMoreClick} rel="noopener noreferrer">{lf("Learn More")}</a>
30
- </div> : undefined}
31
- </div>
32
- }
@@ -1,56 +0,0 @@
1
- .extensionCard.loading {
2
- background: @loadingAnimation;
3
- background-size: 400% 400%;
4
- animation: gradient 3s infinite alternate;
5
- }
6
-
7
- @keyframes gradient {
8
- 0% {
9
- background-position: 0% 50%;
10
- }
11
- 50% {
12
- background-position: 100% 50%;
13
- }
14
- 100% {
15
- background-position: 0% 50%;
16
- }
17
- }
18
-
19
- .extensionCard.ui.card {
20
- height: 19rem;
21
- display: flex;
22
- justify-content: space-between;
23
- margin: 0;
24
- overflow: hidden;
25
-
26
- img {
27
- height: 11rem;
28
- }
29
-
30
- .content {
31
- justify-content: flex-start;
32
- display: flex;
33
- flex-direction: column;
34
- padding: 0.2em 1em;
35
- }
36
-
37
- .name {
38
- font-family: @defaultFont;
39
- font-weight: 600;
40
- font-size: 1.5rem;
41
- line-height: 1.6rem;
42
- padding-top: .5rem;
43
- }
44
-
45
- .description {
46
- font-weight: 400;
47
- text-overflow: ellipsis;
48
- padding-top: .8rem;
49
- font-size: 1rem;
50
- }
51
-
52
- .learnmore {
53
- font-size: 1rem;
54
- align-self: flex-end;
55
- }
56
- }