@drupal-canvas/cli 0.3.0 → 0.5.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.
- package/README.md +254 -7
- package/dist/index.js +714 -401
- package/dist/index.js.map +1 -1
- package/dist/templates/hello-world/component.yml +4 -4
- package/dist/templates/hello-world/index.jsx +3 -3
- package/package.json +1 -1
|
@@ -10,16 +10,16 @@ props:
|
|
|
10
10
|
description: The greeting to display
|
|
11
11
|
examples:
|
|
12
12
|
- Hello World
|
|
13
|
-
|
|
13
|
+
ctaDisplayText:
|
|
14
14
|
type: string
|
|
15
|
-
title: CTA
|
|
15
|
+
title: CTA Display Text
|
|
16
16
|
description: The text for the call to action button
|
|
17
17
|
examples:
|
|
18
18
|
- Click me!
|
|
19
|
-
|
|
19
|
+
ctaLink:
|
|
20
20
|
type: string
|
|
21
21
|
format: uri
|
|
22
|
-
title: CTA
|
|
22
|
+
title: CTA Link
|
|
23
23
|
examples:
|
|
24
24
|
- https://example.com
|
|
25
25
|
slots:
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
const HelloWorld = ({
|
|
5
5
|
greeting = 'Hello world!',
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
ctaDisplayText = 'Click me!',
|
|
7
|
+
ctaLink = 'https://example.com',
|
|
8
8
|
content,
|
|
9
9
|
}) => {
|
|
10
10
|
return (
|
|
@@ -12,7 +12,7 @@ const HelloWorld = ({
|
|
|
12
12
|
<h2 className="greeting">{greeting}</h2>
|
|
13
13
|
<div className="content">{content}</div>
|
|
14
14
|
<button type="button" className="cta">
|
|
15
|
-
<a href={
|
|
15
|
+
<a href={ctaLink}>{ctaDisplayText}</a>
|
|
16
16
|
</button>
|
|
17
17
|
</div>
|
|
18
18
|
);
|