Skip to content

Commit 40d4cc6

Browse files
committed
Override userpurge label
1 parent 8a8cc38 commit 40d4cc6

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog for `react-static-web-apps-auth`
22

3+
## [1.7.0] - 2024-03-26
4+
5+
### Added
6+
7+
- Ability to provide a custom label to `UserPurge`
8+
39
## [1.6.1] - 2024-01-17
410

511
## Added

react-static-web-apps-auth/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aaronpowell/react-static-web-apps-auth",
3-
"version": "1.6.0",
3+
"version": "1.7.0",
44
"description": "A library to help creating authenticated React apps on Azure Static Web Apps",
55
"main": "build/index.js",
66
"types": "build/index.d.ts",

react-static-web-apps-auth/src/UserPurge.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ import { AuthProviders } from "./types";
55
const UserPurge = ({
66
globally,
77
provider,
8+
label
89
}: {
910
globally: boolean;
1011
provider: AuthProviders;
12+
label?: string
1113
}) => {
1214
const host = globally ? "identity.azurestaticapps.net" : location.hostname;
1315

@@ -16,7 +18,7 @@ const UserPurge = ({
1618
href={`https://${host}/.auth/purge/${provider}`}
1719
className={`purge ${StaticWebAppsClassName}`}
1820
>
19-
Purge user information
21+
{label ?? "Purge user information"}
2022
</a>
2123
);
2224
};

0 commit comments

Comments
 (0)