3.0.0 • Published 25 days ago

@dpa-it/dpa-id-partner-components-react v3.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
25 days ago

DPA-ID Partner Components react library

React wrapper for the DPA ID partner components.

Install

To add the package to your project run

npm install @dpa-it/dpa-id-partner-components-react

Usage

You can import the component like any other react component.

import React, { useState } from 'react';
import { DpaIdAppswitcher, DpaIdUsericon, defineCustomElements } from '@dpa-it/dpa-id-partner-components-react';

defineCustomElements();

function Example() {
  return (
    <div>
      <DpaIdAppswitcher></DpaIdAppswitcher>
      <DpaIdUsericon></DpaIdUsericon>
    </div>
  );
}

Properties

Appswitcher

PropertyAttributeDescriptionTypeDefault
arrowDistanceRightarrow-distance-rightDistance of the arrow from the right borderstring'1rem'
backgroundColorbackground-colorColor of the backgroundstring'#fff'
fontColorfont-colorColor of the fontstring'rgb(33, 33, 33)'
iconColoricon-colorColor of the iconstring'rgb(33, 33, 33)'
outerSizeouter-sizeInner size of the iconnumber24
overlayRightoverlay-rightDistance of the overlay from the right border of the wrapperstring'0'
overlayTopoverlay-topDistance of the overlay from the bottom border of the wrapperstring'30px'

UserIcon

Properties

PropertyAttributeDescriptionTypeDefault
arrowDistanceRightarrow-distance-rightDistance of the arrow from the right borderstring'1rem'
clientIdclient-idAuth0 client ID, needed for logoutstring''
firstnamefirstnameUser firstnamestring''
imgUrlimg-urlProfile picture of the user to be displayedstring''
initialsinitialsUser initialsstring''
lastnamelastnameUser lastnamestring''
logoutLabellogout-labelButton label to logoutstring'Abmelden'
manageIdLabelmanage-id-labelButton label that links to the DPA ID management dashboardstring'dpa ID verwalten'
overlayRightoverlay-rightDistance of the overlay from the right border of the wrapperstring'0px'
overlayTopoverlay-topDistance of the overlay from the bottom border of the wrapperstring'30px'
serviceserviceService name (reflected to Useradmin myprofile URL as a parameter, if specified and not empty)string''
sizesizeIcon sizenumber24
stageAuth0stage-auth-0Stage of auth0 to refer to"dev" \| "prod" \| "staging"'prod'
stageUseradminstage-useradminStage of user-administration to refer to"dev" \| "prod" \| "staging"'prod'

Events

EventDescriptionType
logoutEvent fired when clicking the logout buttonCustomEvent<void>

Methods

redirectToAuth0() => Promise<void>

redirects to the correct logout url of auth0

Returns

Type: Promise<void>

3.0.0

25 days ago

2.6.1-alpha.0

1 month ago

2.6.0-alpha.0

2 months ago

2.5.2

3 months ago

2.5.1

3 months ago

2.5.0

4 months ago

2.4.2

6 months ago

2.4.1

6 months ago

2.4.0

6 months ago

2.3.0

6 months ago

2.2.4

6 months ago

2.2.3

7 months ago

2.2.2

7 months ago

2.2.1

8 months ago

2.2.0

8 months ago

2.1.0

9 months ago

2.0.9

9 months ago

2.0.8

9 months ago

2.0.7

9 months ago

2.0.6

9 months ago

2.0.5

9 months ago

2.0.4

9 months ago

2.0.3

9 months ago

2.0.2

9 months ago

2.0.1

9 months ago