updated readme

includes images
This commit is contained in:
flowerbot 2022-08-01 10:11:22 +10:00
parent cf17587f77
commit f587dd75ac
5 changed files with 14 additions and 11 deletions

View File

@ -3,7 +3,7 @@
## Summary ## Summary
Custom Property Pane pain resolved (whew), color palette generator inspired by [Jhey](https://codepen.io/jh3y/pen/rNjbmBQ?editors=0011). Custom Property Pane pain resolved (whew), color palette generator inspired by [Jhey](https://codepen.io/jh3y/pen/rNjbmBQ?editors=0011).
Built it to get an understanding of [Property Pane Portal](https://www.npmjs.com/package/property-pane-portal) and cuz I to build in a dynamic palette generator/css reader for my web parts. Built it to get an understanding of [Property Pane Portal](https://www.npmjs.com/package/property-pane-portal) and cuz I want to eventually build in a dynamic palette generator/css reader for my web parts.
## Used SharePoint Framework Version ## Used SharePoint Framework Version
@ -53,7 +53,8 @@ Version|Date|Comments
Next step is see if I can make prism work with it (as per inspiring example), and then to have the generated colors applied to web part elements. Next step is see if I can make prism work with it (as per inspiring example), and then to have the generated colors applied to web part elements.
[picture of the solution in action, if possible] ![property pane view](images/palettePickerWebPart.gif)
![after save and refresh](images/palettePickerWebPartAfterSaveAndRefresh.gif)
This web part illustrates the following concepts: This web part illustrates the following concepts:

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

18
package-lock.json generated
View File

@ -2377,6 +2377,16 @@
"msal": "1.4.13", "msal": "1.4.13",
"msalLegacy": "npm:msal@1.4.12", "msalLegacy": "npm:msal@1.4.12",
"tslib": "~1.10.0" "tslib": "~1.10.0"
},
"dependencies": {
"msalLegacy": {
"version": "npm:msal@1.4.12",
"resolved": "https://registry.npmjs.org/msal/-/msal-1.4.12.tgz",
"integrity": "sha512-gjupwQ6nvNL6mZkl5NIXyUmZhTiEMRu5giNdgHMh8l5EPOnV2Xj6nukY1NIxFacSTkEYUSDB47Pej9GxDYf+1w==",
"requires": {
"tslib": "^1.9.3"
}
}
} }
}, },
"@microsoft/sp-loader": { "@microsoft/sp-loader": {
@ -14453,14 +14463,6 @@
"tslib": "^1.9.3" "tslib": "^1.9.3"
} }
}, },
"msalLegacy": {
"version": "npm:msal@1.4.12",
"resolved": "https://registry.npmjs.org/msal/-/msal-1.4.12.tgz",
"integrity": "sha512-gjupwQ6nvNL6mZkl5NIXyUmZhTiEMRu5giNdgHMh8l5EPOnV2Xj6nukY1NIxFacSTkEYUSDB47Pej9GxDYf+1w==",
"requires": {
"tslib": "^1.9.3"
}
},
"multicast-dns": { "multicast-dns": {
"version": "6.2.3", "version": "6.2.3",
"resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz", "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz",

View File

@ -38,7 +38,7 @@ export default class PalettePickerWebPart extends BaseClientSideWebPart<IPalette
const ppProps = { const ppProps = {
cssObjectText: this.properties["cssObjectText"], cssObjectText: this.properties["cssObjectText"],
context: this.context, context: this.context,
cssObject: JSON.parse(this.properties["cssObjectText"]), cssObject: this.properties["cssObjectText"] != undefined ? JSON.parse(this.properties["cssObjectText"]) : {},
fontColor: this.properties.fontColor fontColor: this.properties.fontColor
} }