@newhighsco/chipset 6.22.0 → 6.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@newhighsco/chipset",
3
3
  "description": "Shareable, theme-able component library by New High Score",
4
- "version": "6.22.0",
4
+ "version": "6.23.0",
5
5
  "author": "New High Score",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -4,12 +4,25 @@ import React from 'react'
4
4
  import { classNames } from '../../utils'
5
5
  import SmartLink from '../SmartLink'
6
6
 
7
- const Button = ({ active, children, theme, className, setRef, ...rest }) => {
7
+ const Button = ({
8
+ variant,
9
+ active,
10
+ children,
11
+ theme,
12
+ className,
13
+ setRef,
14
+ ...rest
15
+ }) => {
8
16
  if (!children) return null
9
17
 
10
18
  return (
11
19
  <SmartLink
12
- className={classNames(theme?.root, active && theme?.active, className)}
20
+ className={classNames(
21
+ theme?.root,
22
+ variant && theme?.[variant],
23
+ active && theme?.active,
24
+ className
25
+ )}
13
26
  ref={setRef}
14
27
  {...rest}
15
28
  >
@@ -20,9 +33,10 @@ const Button = ({ active, children, theme, className, setRef, ...rest }) => {
20
33
 
21
34
  Button.displayName = 'Button'
22
35
  Button.propTypes = {
36
+ variant: string,
23
37
  active: bool,
24
38
  children: node,
25
- theme: shape({ root: string, active: string }),
39
+ theme: shape({ root: string, active: string, variant: string }),
26
40
  setRef: oneOfType([func, object]),
27
41
  className: string
28
42
  }