sp-dev-fx-webparts/samples/js-propertycontrols-svg
Joel Rodrigues 764d8f10e0 Add tslint at the root of each SPFx project (#394) 2018-01-08 15:58:48 +02:00
..
assets Js property controls svg (#364) 2017-12-01 16:40:23 +02:00
config Js property controls svg (#364) 2017-12-01 16:40:23 +02:00
src/webparts/svgHero Js property controls svg (#364) 2017-12-01 16:40:23 +02:00
typings Js property controls svg (#364) 2017-12-01 16:40:23 +02:00
.editorconfig Js property controls svg (#364) 2017-12-01 16:40:23 +02:00
.gitignore Js property controls svg (#364) 2017-12-01 16:40:23 +02:00
.yo-rc.json Js property controls svg (#364) 2017-12-01 16:40:23 +02:00
README.md Js property controls svg (#364) 2017-12-01 16:40:23 +02:00
gulpfile.js Js property controls svg (#364) 2017-12-01 16:40:23 +02:00
package.json Js property controls svg (#364) 2017-12-01 16:40:23 +02:00
tsconfig.json Js property controls svg (#364) 2017-12-01 16:40:23 +02:00
tslint.json Add tslint at the root of each SPFx project (#394) 2018-01-08 15:58:48 +02:00

README.md

JS Property Controls SVG

Summary

An SPFx webpart that displays a Scalable Vector Graphics (SVG) image using properties to customize how it is rendered. The webpart utilizes the PnP SPFx Property Controls package (specifially the SpinButton and ColorPicker) to set these properties.

picture of the web part in action

Used SharePoint Framework Version

drop

Which PnP SPFx controls are being used in this sample?

Applies to

Solution

Solution Author(s)
js-propertycontrols-svg Chris Kent (thechriskent.com, @thechriskent)

Version history

Version Date Comments
1.0 November 12, 2017 Initial release

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.


Minimal Path to Awesome

  • Clone this repository
  • in the command line run:
    • npm install
    • gulp serve
  • Customize your PnP Hero!

Features

Displays a Scalable Vector Graphics (SVG) image of the SharePoint Patterns and Practices Super Hero and allows users to customize the colors used and the size of the image through the use of PnP SPFx Property Controls (SpinButton & ColorPicker).

This Web Part illustrates the following concepts on top of the SharePoint Framework:

  • Rendering an SVG image
  • Using a PropertyFieldSpinButton control
  • Using a PropertyFieldColorPicker control

Screenshot