@sikt/sds-badge
Advanced tools
Comparing version 0.1.0 to 1.0.0
/// <reference types="react" /> | ||
import { ReactNode } from "react"; | ||
interface BadgeProps { | ||
import { HTMLAttributes, ReactNode } from "react"; | ||
interface BadgeProps extends HTMLAttributes<HTMLSpanElement> { | ||
className?: string; | ||
children: ReactNode; | ||
badgeType?: "action" | "success" | "danger" | "warning" | "info"; | ||
visibility?: "high" | "medium" | "low"; | ||
icon?: ReactNode; | ||
} | ||
declare const Badge: ({ badgeType, className, children, icon, ...rest }: BadgeProps) => JSX.Element; | ||
declare const Badge: ({ badgeType, visibility, className, children, icon, ...rest }: BadgeProps) => JSX.Element; | ||
export type { BadgeProps }; | ||
export { Badge }; |
@@ -1,2 +0,2 @@ | ||
import{jsxs as s,jsx as e}from"react/jsx-runtime";import a from"clsx";const c=({badgeType:c="action",className:d,children:i,icon:r,...n})=>s("span",{className:a("sds-badge",`sds-badge--${c}`,d),...n,children:[r&&e("div",{className:"sds-badge__icon",children:r}),i]});export{c as Badge}; | ||
import{jsxs as s,jsx as i}from"react/jsx-runtime";import e from"clsx";const a=({badgeType:a="action",visibility:d="medium",className:c,children:m,icon:r,...l})=>s("span",{className:e("sds-badge",`sds-badge--${a}`,`sds-badge--visibility-${d}`,c),...l,children:[r&&i("div",{className:"sds-badge__icon",children:r}),m]});export{a as Badge}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@sikt/sds-badge", | ||
"version": "0.1.0", | ||
"version": "1.0.0", | ||
"license": "UNLICENSED", | ||
@@ -20,3 +20,3 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@sikt/sds-core": "^0.2.0" | ||
"@sikt/sds-core": "^1.0.0" | ||
}, | ||
@@ -23,0 +23,0 @@ "peerDependencies": { |
@@ -28,7 +28,7 @@ # `@sikt/sds-badge` | ||
import { Badge } from "@sikt/sds-badge"; | ||
import { Icon } from "@sikt/sds-icon"; | ||
import { InfoIcon } from "@sikt/sds-icon"; | ||
import "@sikt/sds-badge/dist/index.css"; | ||
import "@sikt/sds-icon/dist/index.css"; | ||
<Badge icon={<Icon icon="info" />}>Information</Badge>; | ||
<Badge icon={<InfoIcon />}>Information</Badge>; | ||
``` | ||
@@ -35,0 +35,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
8425
23
1
+ Added@sikt/sds-core@1.0.1(transitive)
+ Added@types/prop-types@15.7.13(transitive)
+ Added@types/react@18.3.12(transitive)
+ Added@types/react-dom@18.3.1(transitive)
+ Addedcsstype@3.1.3(transitive)
- Removed@sikt/sds-core@0.2.0(transitive)
Updated@sikt/sds-core@^1.0.0