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

@arch-ui/badge

Package Overview
Dependencies
Maintainers
7
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arch-ui/badge - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

6

CHANGELOG.md
# @arch-ui/badge
## 0.0.9
### Patch Changes
- [`946a52fd`](https://github.com/keystonejs/keystone/commit/946a52fd7057bb73f4ffd465ef51498172926866) [#1995](https://github.com/keystonejs/keystone/pull/1995) Thanks [@Vultraz](https://github.com/Vultraz)! - Updated `react` and `react-dom` to 16.12.0.
## 0.0.8

@@ -4,0 +10,0 @@

6

dist/badge.esm.js

@@ -1,4 +0,4 @@

import _extends from '@babel/runtime/helpers/extends';
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
import _defineProperty from '@babel/runtime/helpers/defineProperty';
import _extends from '@babel/runtime/helpers/esm/extends';
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
import React, { PureComponent } from 'react';

@@ -5,0 +5,0 @@ import styled from '@emotion/styled';

{
"name": "@arch-ui/badge",
"description": "Badge Component used in @keystonejs Admin UI.",
"version": "0.0.8",
"version": "0.0.9",
"author": "Jed Watson",

@@ -9,6 +9,6 @@ "license": "MIT",

"peerDependencies": {
"react": "^16.8.6"
"react": "^16.12.0"
},
"devDependencies": {
"react": "^16.8.6"
"react": "^16.12.0"
},

@@ -15,0 +15,0 @@ "dependencies": {

@@ -1,3 +0,1 @@

// @flow
import React, { PureComponent } from 'react';

@@ -44,2 +42,3 @@ import styled from '@emotion/styled';

variant === 'bold' ? boldBackgroundColor[appearance] : subtleBackgroundColor[appearance],
borderRadius: '2em',

@@ -57,14 +56,3 @@ boxSizing: 'border-box',

type Props = {
/* Affects the visual style of the badge */
appearance: 'default' | 'primary' | 'created' | 'removed',
/* The maximum value to display e.g. value = 100, max = 50; "50+" will be displayed */
max: number,
/* The value displayed within the badge. */
value: number,
/* The value displayed within the badge. */
variant: 'bold' | 'subtle',
};
export class Badge extends PureComponent<Props> {
export class Badge extends PureComponent {
static defaultProps = {

@@ -76,3 +64,3 @@ appearance: 'default',

};
getValue = ({ value, max }: { value: number, max: number }) => {
getValue = ({ value, max }) => {
if (value < 0) return '0';

@@ -79,0 +67,0 @@ if (max > 0 && value > max) return `${max}+`;

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