4.1.7-alpha.0 • Published 9 months ago

@dpa-it/dpa-id-partner-components-react v4.1.7-alpha.0

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months 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>

4.1.7-alpha.0

9 months ago

4.1.5-alpha.0

9 months ago

4.1.3-alpha.0

9 months ago

4.1.6-alpha.0

9 months ago

4.1.4-alpha.0

9 months ago

4.0.2-alpha.0

10 months ago

4.0.11-alpha.0

10 months ago

4.0.4-alpha.0

10 months ago

4.0.21-alpha.0

9 months ago

4.0.15-alpha.0

10 months ago

3.0.12

1 year ago

3.0.13

12 months ago

3.0.2

1 year ago

3.0.11

1 year ago

3.0.8

1 year ago

4.0.7-alpha.0

10 months ago

3.0.7

1 year ago

3.0.14

11 months ago

3.0.5

1 year ago

4.0.13-alpha.0

10 months ago

4.0.17-alpha.0

10 months ago

4.0.9-alpha.0

10 months ago

4.0.3-alpha.0

10 months ago

4.0.19-alpha.0

10 months ago

4.0.10-alpha.0

10 months ago

4.0.5-alpha.0

10 months ago

4.0.20-alpha.0

9 months ago

4.0.22-alpha.0

9 months ago

3.0.9

1 year ago

4.0.1-alpha.0

10 months ago

4.0.8-alpha.0

10 months ago

4.0.6-alpha.0

10 months ago

4.0.18-alpha.0

10 months ago

4.0.12-alpha.0

10 months ago

4.1.0

9 months ago

4.0.16-alpha.0

10 months ago

4.0.14-alpha.0

10 months ago

3.0.15-alpha.0

10 months ago

3.0.0

1 year ago

2.6.1-alpha.0

1 year ago

2.6.0-alpha.0

1 year ago

2.5.2

1 year ago

2.5.1

1 year ago

2.5.0

1 year ago

2.4.2

2 years ago

2.4.1

2 years ago

2.4.0

2 years ago

2.3.0

2 years ago

2.2.4

2 years ago

2.2.3

2 years ago

2.2.2

2 years ago

2.2.1

2 years ago

2.2.0

2 years ago

2.1.0

2 years ago

2.0.9

2 years ago

2.0.8

2 years ago

2.0.7

2 years ago

2.0.6

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago