Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@influitive/profile-card

Package Overview
Dependencies
Maintainers
3
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@influitive/profile-card

This application was scaffolded via [create-infl-app](https://gitlab.influitive.io/influitive/create-infl-app)

  • 3.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
189
Maintainers
3
Weekly downloads
 
Created
Source

This application was scaffolded via create-infl-app

Profile Card

A pop over card component that displays user information and provides some relevant links.

###Installation Add "@influitive/profile-card": "X.X.XX" to the projects package JSON ( replaces X.X.XX with the version you want to use)

npm install
npm start

###To run storybook

  1. Add storybook's port to puma to be able to load fonts. echo 6006 > ~/.puma-dev/profile-card-storybook.infl
  2. npm run storybook
  3. Go to https://profile-card-storybook.infl.dev

Customize storybook by changing .storybook/preview-head.html and stories directory.

Run testing (in another terminal)

npm test -- --watch

###Usage In your component:

import ProfileCard from '@influitive/profile-card/lib';

<ProfileCard
  id={contactUUID}
  disableViewProfile={aBooleanProp}
  anonymous={aBooleanProp}
  disableMessage={aBooleanProp}
  children={wrappedElement} />

###Props

  • id (Uuid) of the user whose information is to be display in the card.
  • disableViewProfile (bool) When true hides the link to the user public profile.
  • disableMessage (bool) When true hides the link to message that contact.
  • anonymous (bool) when true renders the generic anonymous advocate information.
  • children (node) Corresponds to the element to be wrapped. The profile card will toggle when clicking on this element.

Extra Considerations: You will need to style the element that is being wrapped, as the profile-card does not make assumptions about its children. E.g for avatar images we are normally using:

.profile {
  width: 32px;
  border-radius: 100%;
}

###How it works profile-card is just a regular component built using react-redux. When the children element is clicked an ajax call is fired to the hub's /api/people/${id}.jsonto retrieve that specific user information.

FAQs

Package last updated on 11 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc