@rmwc/badge
Advanced tools
Comparing version 6.0.0-alpha.11 to 6.0.0-alpha.12
@@ -147,3 +147,3 @@ { | ||
"name": "BadgeAnchorProps", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/badge/index.tsx#L45", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/badge/index.tsx#L46", | ||
"methods": [], | ||
@@ -150,0 +150,0 @@ "properties": [] |
@@ -0,3 +1,3 @@ | ||
import * as RMWC from '@rmwc/types'; | ||
import React from 'react'; | ||
import * as RMWC from '@rmwc/types'; | ||
/** A Badge component for indicating alerts or counts. */ | ||
@@ -15,6 +15,25 @@ export interface BadgeProps { | ||
/** A Badge component for indicating alerts or counts. */ | ||
export declare function Badge(props: BadgeProps & Omit<RMWC.ComponentProps, 'label'>): JSX.Element; | ||
export declare const Badge: { | ||
<Tag extends React.ElementType<any> = "div">(props: (BadgeProps & { | ||
tag?: Tag | undefined; | ||
theme?: RMWC.ThemePropT; | ||
} & React.HTMLProps<HTMLDivElement>) | (BadgeProps & { | ||
tag?: Tag | undefined; | ||
theme?: RMWC.ThemePropT; | ||
} & React.ComponentPropsWithRef<Tag>), ref: any): JSX.Element; | ||
displayName: string; | ||
}; | ||
/** An anchor component for badges. */ | ||
export interface BadgeAnchorProps { | ||
} | ||
export declare function BadgeAnchor(props: BadgeAnchorProps & RMWC.ComponentProps): JSX.Element; | ||
/** An anchor component for badges. */ | ||
export declare const BadgeAnchor: { | ||
<Tag extends React.ElementType<any> = "div">(props: (BadgeAnchorProps & { | ||
tag?: Tag | undefined; | ||
theme?: RMWC.ThemePropT; | ||
} & React.HTMLProps<HTMLDivElement>) | (BadgeAnchorProps & { | ||
tag?: Tag | undefined; | ||
theme?: RMWC.ThemePropT; | ||
} & React.ComponentPropsWithRef<Tag>), ref: any): JSX.Element; | ||
displayName: string; | ||
}; |
@@ -7,3 +7,3 @@ "use strict"; | ||
/** A Badge component for indicating alerts or counts. */ | ||
function Badge(props) { | ||
exports.Badge = base_1.createComponent(function Badge(props, ref) { | ||
var _a = props.align, align = _a === void 0 ? 'end' : _a, label = props.label, style = props.style, exited = props.exited, inset = props.inset, rest = tslib_1.__rest(props, ["align", "label", "style", "exited", "inset"]); | ||
@@ -20,10 +20,9 @@ var className = base_1.useClassNames(props, [ | ||
? tslib_1.__assign(tslib_1.__assign({}, style), { '--rmwc-badge-inset': inset }) : style; | ||
return (react_1.default.createElement(base_1.Tag, tslib_1.__assign({}, rest, { style: finalStyle, className: className }), (label !== null && label !== void 0 ? label : react_1.default.createElement(react_1.default.Fragment, null, "\u00A0")))); | ||
} | ||
exports.Badge = Badge; | ||
function BadgeAnchor(props) { | ||
return (react_1.default.createElement(base_1.Tag, tslib_1.__assign({}, rest, { style: finalStyle, className: className, ref: ref }), (label !== null && label !== void 0 ? label : react_1.default.createElement(react_1.default.Fragment, null, "\u00A0")))); | ||
}); | ||
/** An anchor component for badges. */ | ||
exports.BadgeAnchor = base_1.createComponent(function BadgeAnchor(props, ref) { | ||
var children = props.children, rest = tslib_1.__rest(props, ["children"]); | ||
var className = base_1.useClassNames(props, ['rmwc-badge-anchor']); | ||
return (react_1.default.createElement("div", tslib_1.__assign({}, rest, { className: className }), children)); | ||
} | ||
exports.BadgeAnchor = BadgeAnchor; | ||
return (react_1.default.createElement(base_1.Tag, tslib_1.__assign({}, rest, { className: className, ref: ref }), children)); | ||
}); |
@@ -147,3 +147,3 @@ { | ||
"name": "BadgeAnchorProps", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/badge/index.tsx#L45", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/badge/index.tsx#L46", | ||
"methods": [], | ||
@@ -150,0 +150,0 @@ "properties": [] |
@@ -147,3 +147,3 @@ { | ||
"name": "BadgeAnchorProps", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/badge/index.tsx#L45", | ||
"sourceUrl": "https://github.com/jamesmfriedman/rmwc/blob/master/src/badge/index.tsx#L46", | ||
"methods": [], | ||
@@ -150,0 +150,0 @@ "properties": [] |
@@ -0,3 +1,3 @@ | ||
import * as RMWC from '@rmwc/types'; | ||
import React from 'react'; | ||
import * as RMWC from '@rmwc/types'; | ||
/** A Badge component for indicating alerts or counts. */ | ||
@@ -15,6 +15,25 @@ export interface BadgeProps { | ||
/** A Badge component for indicating alerts or counts. */ | ||
export declare function Badge(props: BadgeProps & Omit<RMWC.ComponentProps, 'label'>): JSX.Element; | ||
export declare const Badge: { | ||
<Tag extends React.ElementType<any> = "div">(props: (BadgeProps & { | ||
tag?: Tag | undefined; | ||
theme?: RMWC.ThemePropT; | ||
} & React.HTMLProps<HTMLDivElement>) | (BadgeProps & { | ||
tag?: Tag | undefined; | ||
theme?: RMWC.ThemePropT; | ||
} & React.ComponentPropsWithRef<Tag>), ref: any): JSX.Element; | ||
displayName: string; | ||
}; | ||
/** An anchor component for badges. */ | ||
export interface BadgeAnchorProps { | ||
} | ||
export declare function BadgeAnchor(props: BadgeAnchorProps & RMWC.ComponentProps): JSX.Element; | ||
/** An anchor component for badges. */ | ||
export declare const BadgeAnchor: { | ||
<Tag extends React.ElementType<any> = "div">(props: (BadgeAnchorProps & { | ||
tag?: Tag | undefined; | ||
theme?: RMWC.ThemePropT; | ||
} & React.HTMLProps<HTMLDivElement>) | (BadgeAnchorProps & { | ||
tag?: Tag | undefined; | ||
theme?: RMWC.ThemePropT; | ||
} & React.ComponentPropsWithRef<Tag>), ref: any): JSX.Element; | ||
displayName: string; | ||
}; |
import { __assign, __rest } from "tslib"; | ||
import React from 'react'; | ||
import { useClassNames, Tag } from '@rmwc/base'; | ||
import { useClassNames, Tag, createComponent } from '@rmwc/base'; | ||
/** A Badge component for indicating alerts or counts. */ | ||
export function Badge(props) { | ||
export var Badge = createComponent(function Badge(props, ref) { | ||
var _a = props.align, align = _a === void 0 ? 'end' : _a, label = props.label, style = props.style, exited = props.exited, inset = props.inset, rest = __rest(props, ["align", "label", "style", "exited", "inset"]); | ||
@@ -17,8 +17,9 @@ var className = useClassNames(props, [ | ||
? __assign(__assign({}, style), { '--rmwc-badge-inset': inset }) : style; | ||
return (React.createElement(Tag, __assign({}, rest, { style: finalStyle, className: className }), (label !== null && label !== void 0 ? label : React.createElement(React.Fragment, null, "\u00A0")))); | ||
} | ||
export function BadgeAnchor(props) { | ||
return (React.createElement(Tag, __assign({}, rest, { style: finalStyle, className: className, ref: ref }), (label !== null && label !== void 0 ? label : React.createElement(React.Fragment, null, "\u00A0")))); | ||
}); | ||
/** An anchor component for badges. */ | ||
export var BadgeAnchor = createComponent(function BadgeAnchor(props, ref) { | ||
var children = props.children, rest = __rest(props, ["children"]); | ||
var className = useClassNames(props, ['rmwc-badge-anchor']); | ||
return (React.createElement("div", __assign({}, rest, { className: className }), children)); | ||
} | ||
return (React.createElement(Tag, __assign({}, rest, { className: className, ref: ref }), children)); | ||
}); |
{ | ||
"name": "@rmwc/badge", | ||
"version": "6.0.0-alpha.11", | ||
"version": "6.0.0-alpha.12", | ||
"description": "RMWC badge component", | ||
@@ -35,6 +35,6 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@rmwc/base": "^6.0.0-alpha.11", | ||
"@rmwc/types": "^6.0.0-alpha.6" | ||
"@rmwc/base": "^6.0.0-alpha.12", | ||
"@rmwc/types": "^6.0.0-alpha.12" | ||
}, | ||
"gitHead": "1106cd3c7be06e866f7854f4d3c78808eabe0164" | ||
"gitHead": "acda27d1056c88c78ce26af6b291b0f23e5f5e30" | ||
} |
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
25
59493
1081
Updated@rmwc/base@^6.0.0-alpha.12
Updated@rmwc/types@^6.0.0-alpha.12