sp-dev-fx-webparts/samples/react-personal-greeting
Hugo Bernier c24aacbd7f Updated telemetry link 2023-03-12 21:16:15 -04:00
..
.vscode Add 'samples/react-personal-greeting/' from commit 'b74fadbcf18a07ebe352855f80708e275a62cdec' 2020-04-14 09:10:02 -04:00
assets Changed docs links to learn 2022-10-24 09:42:45 -04:00
config Adding PnP identifier for the MPN ID entries in samples - distinct sample usage in production 2021-01-07 14:51:39 +02:00
src Fixed tsconfig issue 2020-10-18 16:53:40 -04:00
teams Add 'samples/react-personal-greeting/' from commit 'b74fadbcf18a07ebe352855f80708e275a62cdec' 2020-04-14 09:10:02 -04:00
tools Add 'samples/react-personal-greeting/' from commit 'b74fadbcf18a07ebe352855f80708e275a62cdec' 2020-04-14 09:10:02 -04:00
.editorconfig Add 'samples/react-personal-greeting/' from commit 'b74fadbcf18a07ebe352855f80708e275a62cdec' 2020-04-14 09:10:02 -04:00
.gitignore Add 'samples/react-personal-greeting/' from commit 'b74fadbcf18a07ebe352855f80708e275a62cdec' 2020-04-14 09:10:02 -04:00
.yo-rc.json Updated webpart to spfx 1.11 and added font-size option in the property pane 2020-09-24 11:41:15 -04:00
README.md Updated telemetry link 2023-03-12 21:16:15 -04:00
gulpfile.js Add 'samples/react-personal-greeting/' from commit 'b74fadbcf18a07ebe352855f80708e275a62cdec' 2020-04-14 09:10:02 -04:00
package-lock.json Updated webpart to spfx 1.11 and added font-size option in the property pane 2020-09-24 11:41:15 -04:00
package.json Fixed package/solution version 2020-10-18 16:54:44 -04:00
tsconfig.json Fixed tsconfig issue 2020-10-18 16:53:40 -04:00
tslint.json Add 'samples/react-personal-greeting/' from commit 'b74fadbcf18a07ebe352855f80708e275a62cdec' 2020-04-14 09:10:02 -04:00
yarn.lock Add 'samples/react-personal-greeting/' from commit 'b74fadbcf18a07ebe352855f80708e275a62cdec' 2020-04-14 09:10:02 -04:00

README.md

react-personal-greeting

Summary

The web part pulls in the current user's name and displays it on the page. The greeting text before the name is customizable through the property pane. Additionally the position of the greeting and color of the text can be adjusted through the property pane as well.

picture of the web part in action

Compatibility

⚠️ Important
Every SPFx version is only compatible with specific version(s) of Node.js. In order to be able to build this sample, please ensure that the version of Node on your workstation matches one of the versions listed in this section. This sample will not work on a different version of Node.
Refer to https://aka.ms/spfx-matrix for more information on SPFx compatibility.

SPFx 1.11 Node.js v10 Compatible with SharePoint Online Does not work with SharePoint 2019 Does not work with SharePoint 2016 (Feature Pack 2) Teams Incompatible Local Workbench Incompatible Hosted Workbench Compatible Compatible with Remote Containers

Applies to

Prerequisites

Contributors

Version history

Version Date Comments
1.1 September 24, 2020 Updated SPFX version and added font-size
1.0 April 14, 2020 Initial release

Minimal Path to Awesome

  • Clone this repository
  • in the command line run:
    • npm install
    • gulp build
    • gulp bundle --ship
    • gulp package-solution --ship
  • add the web part to your tenant app store
  • add the app to a SharePoint site and then add the web part to the page

This sample can also be opened with VS Code Remote Development. Visit https://aka.ms/spfx-devcontainer for further instructions.

Features

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

  • Using the SPFx context to gather the current user's display name.
  • Adjusting the styles of the component in the web part using the props adjusted through the property pane.
  • PnP SPFx Placeholder - This component allows you to have a placeholder visible under certain conditions if your web parts requires some setup.
  • PnP SPFx Color Picker - This component adds an awesome color picker to the property pane, great for adjusting colors in your web part.

Help

We do not support samples, but we this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.

If you're having issues building the solution, please run spfx doctor from within the solution folder to diagnose incompatibility issues with your environment.

If you encounter any issues while using this sample, create a new issue.

For questions regarding this sample, create a new question.

Finally, if you have an idea for improvement, make a suggestion.

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.