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

@highlight-ui/alert

Package Overview
Dependencies
Maintainers
10
Versions
166
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@highlight-ui/alert

This is the Alert component used in Personio

  • 7.1.2
  • npm
  • Socket score

Version published
Weekly downloads
606
decreased by-56.02%
Maintainers
10
Weekly downloads
 
Created
Source

npm personio.design storybook.personio.design

@highlight-ui/alert

Using npm:

npm install @highlight-ui/alert

Using yarn:

yarn add @highlight-ui/alert

Using pnpm:

pnpm install @highlight-ui/alert

In your (S)CSS file:

@import url('@highlight-ui/alert');

Once the package is installed, you can import the library:

import { Alert, InlineAlert } from '@highlight-ui/alert';

Usage

import React, { useState } from 'react';
import { Alert } from '@highlight-ui/alert';

export default function AlertExample() {
  return <Alert status="highlight">This is an alert!</Alert>;
}

⚠️⚠️⚠️⚠️ As of version 7.0.0 on both Alert and InlineAlert the pre-defined typographic style on children are removed. ⚠️⚠️⚠️⚠️ so for the component to work properly use next suggestion as an example In your (S)CSS file:

@import url('@highlight-ui/alert');
@import url('@highlight-ui/typography');

In your TS(X) file:

import React, { useState } from 'react';
import { Body } from '@highlight-ui/typography';
import { Alert } from '@highlight-ui/alert';

export default function AlertExample() {
  return (
    <Alert status="highlight">
      <Body color="text-default">This is an alert!</Body>
    </Alert>
  );
}

Props 📜

PropTypeRequiredDefaultDescription
status'highlight', 'success', 'warning', 'critical'YesDefines which variant of the Alert to render
idstringNoGives the alert an id
actionsReact.ReactNodeNoAllows rendering a ReactNode (a button is intended) below the alert content
enableCloseButtonbooleanNofalseAllows showing a close button
fullWidthbooleanNofalseIf true, uses 100% of its container width
iconColorIconColorTokenNoPasses a color to the icon
iconFamily'regular', 'light', 'solid'NosolidPasses a font family to the icon
iconSizenumberNo16Passes a size to the icon
iconNamestringNoPasses an icon name to the icon
onClickCloseButton() => voidNoPasses a function to onClick() of the close button

Custom types 🔠

TypeValuesDescription
IconColorToken"Icon" and "Icon On" color token namesA type exported by the @highlight-ui/icon package

Contributing 🖌️

Please visit personio.design for usage guidelines and visual examples.

If you're interested in contributing, please visit our contribution page.

FAQs

Package last updated on 19 Oct 2023

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