-
-
Notifications
You must be signed in to change notification settings - Fork 328
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Site] Fix React/Svelte/Vue demo build
- Loading branch information
Showing
12 changed files
with
104 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.yarn | ||
yarn.lock | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 12 additions & 19 deletions
31
ux.symfony.com/assets/react/dist/components/PackageList.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,24 @@ | ||
import React from 'react'; | ||
export default function (props) { | ||
if (props.packages.length === 0) { | ||
return /*#__PURE__*/React.createElement("div", { | ||
className: "alert alert-info" | ||
}, "Sad trombone... we haven't built any components that match this search yet!"); | ||
return 'No packages found'; | ||
} | ||
return /*#__PURE__*/React.createElement("div", { | ||
className: "row" | ||
}, props.packages.map(item => /*#__PURE__*/React.createElement("a", { | ||
key: item.name, | ||
href: item.url, | ||
className: "col-12 col-md-4 col-lg-3 mb-2" | ||
className: "PackageList" | ||
}, props.packages.map(item => /*#__PURE__*/React.createElement("div", { | ||
className: "PackageListItem", | ||
key: item.id | ||
}, /*#__PURE__*/React.createElement("div", { | ||
className: "components-container p-2" | ||
}, /*#__PURE__*/React.createElement("div", { | ||
className: "d-flex" | ||
}, /*#__PURE__*/React.createElement("div", { | ||
className: "live-component-img d-flex justify-content-center align-items-center", | ||
className: "PackageListItem__icon", | ||
style: { | ||
background: item.gradient | ||
'--gradient': item.gradient | ||
} | ||
}, /*#__PURE__*/React.createElement("img", { | ||
width: "17px", | ||
height: "17px", | ||
src: item.imageUrl, | ||
alt: `Image for the ${item.humanName} UX package` | ||
})), /*#__PURE__*/React.createElement("h4", { | ||
className: "ubuntu-title ps-2 align-self-center" | ||
}, item.humanName)))))); | ||
})), /*#__PURE__*/React.createElement("h3", { | ||
className: "PackageListItem__label" | ||
}, /*#__PURE__*/React.createElement("a", { | ||
href: item.url | ||
}, item.humanName))))); | ||
} |
32 changes: 17 additions & 15 deletions
32
ux.symfony.com/assets/react/src/components/PackageList.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
import React from 'react'; | ||
|
||
export default function (props) { | ||
if (props.packages.length === 0) { | ||
return 'No packages found'; | ||
} | ||
if (props.packages.length === 0) { | ||
return 'No packages found'; | ||
} | ||
|
||
return ( | ||
props.packages.map(item => ( | ||
<div class="PackageListItem"> | ||
<div class="PackageListItem__icon" style={`--gradient: ${item.gradient}`}> | ||
<img src={item.imageUrl} alt={`Image for the ${item.humanName} UX package`} /> | ||
</div> | ||
<h3 class="PackageListItem__title"> | ||
<a href={item.url}>{item.humanName}</a> | ||
</h3> | ||
</div> | ||
)) | ||
); | ||
return ( | ||
<div className="PackageList"> | ||
{props.packages.map(item => ( | ||
<div className="PackageListItem" key={item.id}> | ||
<div className="PackageListItem__icon" style={{'--gradient': item.gradient}}> | ||
<img src={item.imageUrl} alt={`Image for the ${item.humanName} UX package`}/> | ||
</div> | ||
<h3 className="PackageListItem__label"> | ||
<a href={item.url}>{item.humanName}</a> | ||
</h3> | ||
</div> | ||
))} | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.yarn | ||
yarn.lock | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* generated by Svelte v3.59.1 */ | ||
/* generated by Svelte v3.59.2 */ | ||
import { | ||
SvelteComponent, | ||
append, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters