pxt-core 7.5.49 → 7.5.52

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pxt-core",
3
- "version": "7.5.49",
3
+ "version": "7.5.52",
4
4
  "description": "Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors",
5
5
  "keywords": [
6
6
  "TypeScript",
@@ -13,6 +13,7 @@ export interface ExtensionCardProps<U> {
13
13
  onClick?: (value: U) => void;
14
14
  extension?: U;
15
15
  loading?: boolean;
16
+ showDisclaimer?: boolean
16
17
  }
17
18
 
18
19
  export const ExtensionCard = <U,>(props: ExtensionCardProps<U>) => {
@@ -24,7 +25,8 @@ export const ExtensionCard = <U,>(props: ExtensionCardProps<U>) => {
24
25
  label,
25
26
  onClick,
26
27
  extension,
27
- loading
28
+ loading,
29
+ showDisclaimer
28
30
  } = props;
29
31
 
30
32
  const onCardClick = () => {
@@ -52,14 +54,19 @@ export const ExtensionCard = <U,>(props: ExtensionCardProps<U>) => {
52
54
  {description}
53
55
  </div>
54
56
  </div>
55
- {learnMoreUrl &&
56
- <Button
57
- className="link-button"
58
- label={lf("Learn More")}
59
- title={lf("Learn More")}
60
- onClick={() => { }}
61
- href={learnMoreUrl}
62
- />
57
+ {(showDisclaimer || learnMoreUrl) &&
58
+ <div className="common-extension-card-extra-content">
59
+ {showDisclaimer && lf("User-provided extension, not endorsed by Microsoft.")}
60
+ {learnMoreUrl &&
61
+ <Button
62
+ className="link-button"
63
+ label={lf("Learn More")}
64
+ title={lf("Learn More")}
65
+ onClick={() => { }}
66
+ href={learnMoreUrl}
67
+ />
68
+ }
69
+ </div>
63
70
  }
64
71
  </>
65
72
  }
@@ -41,19 +41,24 @@
41
41
  flex-shrink: 0;
42
42
  }
43
43
 
44
- .common-button.link-button {
45
- text-align: right;
44
+ .common-extension-card-extra-content {
46
45
  padding: 0.5rem 1rem;
47
46
  background: @white;
48
47
  margin: 0;
49
48
  border-radius: 0;
50
49
  border-top: solid 1px @inputBorderColor;
51
50
  flex-shrink: 0;
51
+ font-size: 16px;
52
+ color: @lightTextColor;
52
53
 
53
54
  overflow: hidden;
54
55
  border-bottom-left-radius: 0.5rem;
55
56
  border-bottom-right-radius: 0.5rem;
56
57
  }
58
+
59
+ .common-button.link-button {
60
+ float: right;
61
+ }
57
62
 
58
63
  .common-extension-card-contents {
59
64
  display: flex;