@helpdice/ui 2.3.5 → 2.3.6

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.
@@ -7,6 +7,7 @@ interface Props {
7
7
  shadow?: boolean | string;
8
8
  round?: boolean;
9
9
  a?: boolean;
10
+ to?: string;
10
11
  auto?: boolean;
11
12
  effect?: boolean;
12
13
  disabled?: boolean;
@@ -0,0 +1,17 @@
1
+ import React, { CSSProperties } from 'react';
2
+ import { ButtonTypes } from 'components/button-group';
3
+ type SmallButtonProps = {
4
+ children?: React.ReactNode;
5
+ iconRight?: React.ReactNode;
6
+ to: string;
7
+ icon?: React.ReactNode;
8
+ scale?: number;
9
+ type?: any;
10
+ style?: CSSProperties;
11
+ a?: boolean;
12
+ target?: string;
13
+ color?: ButtonTypes;
14
+ onClick?: () => void;
15
+ };
16
+ declare const _default: React.NamedExoticComponent<SmallButtonProps>;
17
+ export default _default;
@@ -1,9 +1,11 @@
1
1
  import Button from './button';
2
- import CompactButton from './button.compact';
2
+ import IconButton from './button.icon';
3
+ import SmallButton from './button.small';
3
4
  export type { ButtonProps } from './button';
4
5
  export type { ButtonTypes } from '../utils/prop-types';
5
6
  export type ButtonComponentType = typeof Button & {
6
- Compact: typeof CompactButton;
7
+ Icon: typeof IconButton;
8
+ Small: typeof SmallButton;
7
9
  };
8
10
  declare const _default: ButtonComponentType;
9
11
  export default _default;
@@ -1495,16 +1495,6 @@ var CompactButton = function CompactButton(_ref) {
1495
1495
  style = _ref.style,
1496
1496
  onClick = _ref.onClick;
1497
1497
  var theme$1 = theme.useTheme();
1498
- // if (a) {
1499
- // return (
1500
- // <Button icon={icon} style={{
1501
- // ...style,
1502
- // backgroundColor: theme.palette.background
1503
- // }} type={type} onClick={() => window.open(to, target)} auto scale={scale} px={0.6} iconRight={iconRight}>
1504
- // {children}
1505
- // </Button>
1506
- // );
1507
- // }
1508
1498
  return /*#__PURE__*/React.createElement(Button, {
1509
1499
  icon: icon,
1510
1500
  style: _objectSpread2(_objectSpread2({}, style), {}, {
@@ -1518,10 +1508,37 @@ var CompactButton = function CompactButton(_ref) {
1518
1508
  iconRight: iconRight
1519
1509
  }, children);
1520
1510
  };
1521
- var CompactButton$1 = /*#__PURE__*/React.memo(CompactButton);
1511
+ var IconButton = /*#__PURE__*/React.memo(CompactButton);
1512
+
1513
+ var SmallButton = function SmallButton(_ref) {
1514
+ _ref.color;
1515
+ var children = _ref.children,
1516
+ iconRight = _ref.iconRight,
1517
+ icon = _ref.icon,
1518
+ _ref$scale = _ref.scale,
1519
+ scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
1520
+ type = _ref.type,
1521
+ style = _ref.style,
1522
+ onClick = _ref.onClick;
1523
+ var theme$1 = theme.useTheme();
1524
+ return /*#__PURE__*/React.createElement(Button, {
1525
+ icon: icon,
1526
+ style: _objectSpread2(_objectSpread2({}, style), {}, {
1527
+ backgroundColor: theme$1.palette.background
1528
+ }),
1529
+ type: type,
1530
+ onClick: onClick,
1531
+ auto: true,
1532
+ scale: scale,
1533
+ py: 0.6,
1534
+ iconRight: iconRight
1535
+ }, children);
1536
+ };
1537
+ var SmallButton$1 = /*#__PURE__*/React.memo(SmallButton);
1522
1538
 
1523
1539
  /* "use client" */
1524
1540
 
1525
- Button.Compact = CompactButton$1;
1541
+ Button.Icon = IconButton;
1542
+ Button.Small = SmallButton$1;
1526
1543
 
1527
1544
  exports.default = Button;
@@ -2908,16 +2908,6 @@ var CompactButton = function CompactButton(_ref) {
2908
2908
  style = _ref.style,
2909
2909
  onClick = _ref.onClick;
2910
2910
  var theme$1 = theme.useTheme();
2911
- // if (a) {
2912
- // return (
2913
- // <Button icon={icon} style={{
2914
- // ...style,
2915
- // backgroundColor: theme.palette.background
2916
- // }} type={type} onClick={() => window.open(to, target)} auto scale={scale} px={0.6} iconRight={iconRight}>
2917
- // {children}
2918
- // </Button>
2919
- // );
2920
- // }
2921
2911
  return /*#__PURE__*/React.createElement(Button, {
2922
2912
  icon: icon,
2923
2913
  style: _objectSpread2(_objectSpread2({}, style), {}, {
@@ -2931,11 +2921,38 @@ var CompactButton = function CompactButton(_ref) {
2931
2921
  iconRight: iconRight
2932
2922
  }, children);
2933
2923
  };
2934
- var CompactButton$1 = /*#__PURE__*/React.memo(CompactButton);
2924
+ var IconButton = /*#__PURE__*/React.memo(CompactButton);
2925
+
2926
+ var SmallButton = function SmallButton(_ref) {
2927
+ _ref.color;
2928
+ var children = _ref.children,
2929
+ iconRight = _ref.iconRight,
2930
+ icon = _ref.icon,
2931
+ _ref$scale = _ref.scale,
2932
+ scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
2933
+ type = _ref.type,
2934
+ style = _ref.style,
2935
+ onClick = _ref.onClick;
2936
+ var theme$1 = theme.useTheme();
2937
+ return /*#__PURE__*/React.createElement(Button, {
2938
+ icon: icon,
2939
+ style: _objectSpread2(_objectSpread2({}, style), {}, {
2940
+ backgroundColor: theme$1.palette.background
2941
+ }),
2942
+ type: type,
2943
+ onClick: onClick,
2944
+ auto: true,
2945
+ scale: scale,
2946
+ py: 0.6,
2947
+ iconRight: iconRight
2948
+ }, children);
2949
+ };
2950
+ var SmallButton$1 = /*#__PURE__*/React.memo(SmallButton);
2935
2951
 
2936
2952
  /* "use client" */
2937
2953
 
2938
- Button.Compact = CompactButton$1;
2954
+ Button.Icon = IconButton;
2955
+ Button.Small = SmallButton$1;
2939
2956
 
2940
2957
  var isKeyboardEvent$1 = function isKeyboardEvent(e) {
2941
2958
  return e.hasOwnProperty('key');
@@ -1588,16 +1588,6 @@ var CompactButton = function CompactButton(_ref) {
1588
1588
  style = _ref.style,
1589
1589
  onClick = _ref.onClick;
1590
1590
  var theme$1 = theme.useTheme();
1591
- // if (a) {
1592
- // return (
1593
- // <Button icon={icon} style={{
1594
- // ...style,
1595
- // backgroundColor: theme.palette.background
1596
- // }} type={type} onClick={() => window.open(to, target)} auto scale={scale} px={0.6} iconRight={iconRight}>
1597
- // {children}
1598
- // </Button>
1599
- // );
1600
- // }
1601
1591
  return /*#__PURE__*/React.createElement(Button, {
1602
1592
  icon: icon,
1603
1593
  style: _objectSpread2(_objectSpread2({}, style), {}, {
@@ -1611,11 +1601,38 @@ var CompactButton = function CompactButton(_ref) {
1611
1601
  iconRight: iconRight
1612
1602
  }, children);
1613
1603
  };
1614
- var CompactButton$1 = /*#__PURE__*/React.memo(CompactButton);
1604
+ var IconButton = /*#__PURE__*/React.memo(CompactButton);
1605
+
1606
+ var SmallButton = function SmallButton(_ref) {
1607
+ _ref.color;
1608
+ var children = _ref.children,
1609
+ iconRight = _ref.iconRight,
1610
+ icon = _ref.icon,
1611
+ _ref$scale = _ref.scale,
1612
+ scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
1613
+ type = _ref.type,
1614
+ style = _ref.style,
1615
+ onClick = _ref.onClick;
1616
+ var theme$1 = theme.useTheme();
1617
+ return /*#__PURE__*/React.createElement(Button, {
1618
+ icon: icon,
1619
+ style: _objectSpread2(_objectSpread2({}, style), {}, {
1620
+ backgroundColor: theme$1.palette.background
1621
+ }),
1622
+ type: type,
1623
+ onClick: onClick,
1624
+ auto: true,
1625
+ scale: scale,
1626
+ py: 0.6,
1627
+ iconRight: iconRight
1628
+ }, children);
1629
+ };
1630
+ var SmallButton$1 = /*#__PURE__*/React.memo(SmallButton);
1615
1631
 
1616
1632
  /* "use client" */
1617
1633
 
1618
- Button.Compact = CompactButton$1;
1634
+ Button.Icon = IconButton;
1635
+ Button.Small = SmallButton$1;
1619
1636
 
1620
1637
  var _excluded = ["gap", "children", "direction", "justify", "alignItems", "alignContent", "collapse", "className"];
1621
1638
  var wrap = tuple('nowrap', 'wrap', 'wrap-reverse');
@@ -1630,16 +1630,6 @@ var CompactButton = function CompactButton(_ref) {
1630
1630
  style = _ref.style,
1631
1631
  onClick = _ref.onClick;
1632
1632
  var theme$1 = theme.useTheme();
1633
- // if (a) {
1634
- // return (
1635
- // <Button icon={icon} style={{
1636
- // ...style,
1637
- // backgroundColor: theme.palette.background
1638
- // }} type={type} onClick={() => window.open(to, target)} auto scale={scale} px={0.6} iconRight={iconRight}>
1639
- // {children}
1640
- // </Button>
1641
- // );
1642
- // }
1643
1633
  return /*#__PURE__*/React.createElement(Button, {
1644
1634
  icon: icon,
1645
1635
  style: _objectSpread2(_objectSpread2({}, style), {}, {
@@ -1653,11 +1643,38 @@ var CompactButton = function CompactButton(_ref) {
1653
1643
  iconRight: iconRight
1654
1644
  }, children);
1655
1645
  };
1656
- var CompactButton$1 = /*#__PURE__*/React.memo(CompactButton);
1646
+ var IconButton = /*#__PURE__*/React.memo(CompactButton);
1647
+
1648
+ var SmallButton = function SmallButton(_ref) {
1649
+ _ref.color;
1650
+ var children = _ref.children,
1651
+ iconRight = _ref.iconRight,
1652
+ icon = _ref.icon,
1653
+ _ref$scale = _ref.scale,
1654
+ scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
1655
+ type = _ref.type,
1656
+ style = _ref.style,
1657
+ onClick = _ref.onClick;
1658
+ var theme$1 = theme.useTheme();
1659
+ return /*#__PURE__*/React.createElement(Button, {
1660
+ icon: icon,
1661
+ style: _objectSpread2(_objectSpread2({}, style), {}, {
1662
+ backgroundColor: theme$1.palette.background
1663
+ }),
1664
+ type: type,
1665
+ onClick: onClick,
1666
+ auto: true,
1667
+ scale: scale,
1668
+ py: 0.6,
1669
+ iconRight: iconRight
1670
+ }, children);
1671
+ };
1672
+ var SmallButton$1 = /*#__PURE__*/React.memo(SmallButton);
1657
1673
 
1658
1674
  /* "use client" */
1659
1675
 
1660
- Button.Compact = CompactButton$1;
1676
+ Button.Icon = IconButton;
1677
+ Button.Small = SmallButton$1;
1661
1678
 
1662
1679
  // export function Clipboard(props: ClipboardProps) {
1663
1680
  // const { setToast } = useToasts();
package/dist/index.js CHANGED
@@ -5125,16 +5125,6 @@ var CompactButton = function CompactButton(_ref) {
5125
5125
  style = _ref.style,
5126
5126
  onClick = _ref.onClick;
5127
5127
  var theme$1 = theme.useTheme();
5128
- // if (a) {
5129
- // return (
5130
- // <Button icon={icon} style={{
5131
- // ...style,
5132
- // backgroundColor: theme.palette.background
5133
- // }} type={type} onClick={() => window.open(to, target)} auto scale={scale} px={0.6} iconRight={iconRight}>
5134
- // {children}
5135
- // </Button>
5136
- // );
5137
- // }
5138
5128
  return /*#__PURE__*/React$1.createElement(Button, {
5139
5129
  icon: icon,
5140
5130
  style: _objectSpread2(_objectSpread2({}, style), {}, {
@@ -5148,11 +5138,38 @@ var CompactButton = function CompactButton(_ref) {
5148
5138
  iconRight: iconRight
5149
5139
  }, children);
5150
5140
  };
5151
- var CompactButton$1 = /*#__PURE__*/React$1.memo(CompactButton);
5141
+ var IconButton = /*#__PURE__*/React$1.memo(CompactButton);
5142
+
5143
+ var SmallButton = function SmallButton(_ref) {
5144
+ _ref.color;
5145
+ var children = _ref.children,
5146
+ iconRight = _ref.iconRight,
5147
+ icon = _ref.icon,
5148
+ _ref$scale = _ref.scale,
5149
+ scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
5150
+ type = _ref.type,
5151
+ style = _ref.style,
5152
+ onClick = _ref.onClick;
5153
+ var theme$1 = theme.useTheme();
5154
+ return /*#__PURE__*/React$1.createElement(Button, {
5155
+ icon: icon,
5156
+ style: _objectSpread2(_objectSpread2({}, style), {}, {
5157
+ backgroundColor: theme$1.palette.background
5158
+ }),
5159
+ type: type,
5160
+ onClick: onClick,
5161
+ auto: true,
5162
+ scale: scale,
5163
+ py: 0.6,
5164
+ iconRight: iconRight
5165
+ }, children);
5166
+ };
5167
+ var SmallButton$1 = /*#__PURE__*/React$1.memo(SmallButton);
5152
5168
 
5153
5169
  /* "use client" */
5154
5170
 
5155
- Button.Compact = CompactButton$1;
5171
+ Button.Icon = IconButton;
5172
+ Button.Small = SmallButton$1;
5156
5173
 
5157
5174
  /* "use client" */
5158
5175
 
@@ -1864,16 +1864,6 @@ var CompactButton = function CompactButton(_ref) {
1864
1864
  style = _ref.style,
1865
1865
  onClick = _ref.onClick;
1866
1866
  var theme$1 = theme.useTheme();
1867
- // if (a) {
1868
- // return (
1869
- // <Button icon={icon} style={{
1870
- // ...style,
1871
- // backgroundColor: theme.palette.background
1872
- // }} type={type} onClick={() => window.open(to, target)} auto scale={scale} px={0.6} iconRight={iconRight}>
1873
- // {children}
1874
- // </Button>
1875
- // );
1876
- // }
1877
1867
  return /*#__PURE__*/React.createElement(Button, {
1878
1868
  icon: icon,
1879
1869
  style: _objectSpread2(_objectSpread2({}, style), {}, {
@@ -1887,11 +1877,38 @@ var CompactButton = function CompactButton(_ref) {
1887
1877
  iconRight: iconRight
1888
1878
  }, children);
1889
1879
  };
1890
- var CompactButton$1 = /*#__PURE__*/React.memo(CompactButton);
1880
+ var IconButton = /*#__PURE__*/React.memo(CompactButton);
1881
+
1882
+ var SmallButton = function SmallButton(_ref) {
1883
+ _ref.color;
1884
+ var children = _ref.children,
1885
+ iconRight = _ref.iconRight,
1886
+ icon = _ref.icon,
1887
+ _ref$scale = _ref.scale,
1888
+ scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
1889
+ type = _ref.type,
1890
+ style = _ref.style,
1891
+ onClick = _ref.onClick;
1892
+ var theme$1 = theme.useTheme();
1893
+ return /*#__PURE__*/React.createElement(Button, {
1894
+ icon: icon,
1895
+ style: _objectSpread2(_objectSpread2({}, style), {}, {
1896
+ backgroundColor: theme$1.palette.background
1897
+ }),
1898
+ type: type,
1899
+ onClick: onClick,
1900
+ auto: true,
1901
+ scale: scale,
1902
+ py: 0.6,
1903
+ iconRight: iconRight
1904
+ }, children);
1905
+ };
1906
+ var SmallButton$1 = /*#__PURE__*/React.memo(SmallButton);
1891
1907
 
1892
1908
  /* "use client" */
1893
1909
 
1894
- Button.Compact = CompactButton$1;
1910
+ Button.Icon = IconButton;
1911
+ Button.Small = SmallButton$1;
1895
1912
 
1896
1913
  var _excluded = ["h1", "h2", "h3", "h4", "h5", "h6", "p", "b", "small", "i", "span", "del", "em", "blockquote", "noWrap", "collapse", "children", "className"];
1897
1914
  var _getModifierChild = function getModifierChild(tags, children) {
@@ -22537,16 +22537,6 @@ var CompactButton = function CompactButton(_ref) {
22537
22537
  style = _ref.style,
22538
22538
  onClick = _ref.onClick;
22539
22539
  var theme$1 = theme.useTheme();
22540
- // if (a) {
22541
- // return (
22542
- // <Button icon={icon} style={{
22543
- // ...style,
22544
- // backgroundColor: theme.palette.background
22545
- // }} type={type} onClick={() => window.open(to, target)} auto scale={scale} px={0.6} iconRight={iconRight}>
22546
- // {children}
22547
- // </Button>
22548
- // );
22549
- // }
22550
22540
  return /*#__PURE__*/React.createElement(Button, {
22551
22541
  icon: icon,
22552
22542
  style: _objectSpread2(_objectSpread2({}, style), {}, {
@@ -22560,11 +22550,38 @@ var CompactButton = function CompactButton(_ref) {
22560
22550
  iconRight: iconRight
22561
22551
  }, children);
22562
22552
  };
22563
- var CompactButton$1 = /*#__PURE__*/React.memo(CompactButton);
22553
+ var IconButton = /*#__PURE__*/React.memo(CompactButton);
22554
+
22555
+ var SmallButton = function SmallButton(_ref) {
22556
+ _ref.color;
22557
+ var children = _ref.children,
22558
+ iconRight = _ref.iconRight,
22559
+ icon = _ref.icon,
22560
+ _ref$scale = _ref.scale,
22561
+ scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
22562
+ type = _ref.type,
22563
+ style = _ref.style,
22564
+ onClick = _ref.onClick;
22565
+ var theme$1 = theme.useTheme();
22566
+ return /*#__PURE__*/React.createElement(Button, {
22567
+ icon: icon,
22568
+ style: _objectSpread2(_objectSpread2({}, style), {}, {
22569
+ backgroundColor: theme$1.palette.background
22570
+ }),
22571
+ type: type,
22572
+ onClick: onClick,
22573
+ auto: true,
22574
+ scale: scale,
22575
+ py: 0.6,
22576
+ iconRight: iconRight
22577
+ }, children);
22578
+ };
22579
+ var SmallButton$1 = /*#__PURE__*/React.memo(SmallButton);
22564
22580
 
22565
22581
  /* "use client" */
22566
22582
 
22567
- Button.Compact = CompactButton$1;
22583
+ Button.Icon = IconButton;
22584
+ Button.Small = SmallButton$1;
22568
22585
 
22569
22586
  var _excluded$5 = ["h1", "h2", "h3", "h4", "h5", "h6", "p", "b", "small", "i", "span", "del", "em", "blockquote", "noWrap", "collapse", "children", "className"];
22570
22587
  var _getModifierChild = function getModifierChild(tags, children) {
@@ -1559,16 +1559,6 @@ var CompactButton = function CompactButton(_ref) {
1559
1559
  style = _ref.style,
1560
1560
  onClick = _ref.onClick;
1561
1561
  var theme$1 = theme.useTheme();
1562
- // if (a) {
1563
- // return (
1564
- // <Button icon={icon} style={{
1565
- // ...style,
1566
- // backgroundColor: theme.palette.background
1567
- // }} type={type} onClick={() => window.open(to, target)} auto scale={scale} px={0.6} iconRight={iconRight}>
1568
- // {children}
1569
- // </Button>
1570
- // );
1571
- // }
1572
1562
  return /*#__PURE__*/React.createElement(Button, {
1573
1563
  icon: icon,
1574
1564
  style: _objectSpread2(_objectSpread2({}, style), {}, {
@@ -1582,11 +1572,38 @@ var CompactButton = function CompactButton(_ref) {
1582
1572
  iconRight: iconRight
1583
1573
  }, children);
1584
1574
  };
1585
- var CompactButton$1 = /*#__PURE__*/React.memo(CompactButton);
1575
+ var IconButton = /*#__PURE__*/React.memo(CompactButton);
1576
+
1577
+ var SmallButton = function SmallButton(_ref) {
1578
+ _ref.color;
1579
+ var children = _ref.children,
1580
+ iconRight = _ref.iconRight,
1581
+ icon = _ref.icon,
1582
+ _ref$scale = _ref.scale,
1583
+ scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
1584
+ type = _ref.type,
1585
+ style = _ref.style,
1586
+ onClick = _ref.onClick;
1587
+ var theme$1 = theme.useTheme();
1588
+ return /*#__PURE__*/React.createElement(Button, {
1589
+ icon: icon,
1590
+ style: _objectSpread2(_objectSpread2({}, style), {}, {
1591
+ backgroundColor: theme$1.palette.background
1592
+ }),
1593
+ type: type,
1594
+ onClick: onClick,
1595
+ auto: true,
1596
+ scale: scale,
1597
+ py: 0.6,
1598
+ iconRight: iconRight
1599
+ }, children);
1600
+ };
1601
+ var SmallButton$1 = /*#__PURE__*/React.memo(SmallButton);
1586
1602
 
1587
1603
  /* "use client" */
1588
1604
 
1589
- Button.Compact = CompactButton$1;
1605
+ Button.Icon = IconButton;
1606
+ Button.Small = SmallButton$1;
1590
1607
 
1591
1608
  var _excluded = ["h1", "h2", "h3", "h4", "h5", "h6", "p", "b", "small", "i", "span", "del", "em", "blockquote", "noWrap", "collapse", "children", "className"];
1592
1609
  var _getModifierChild = function getModifierChild(tags, children) {
@@ -7,6 +7,7 @@ interface Props {
7
7
  shadow?: boolean | string;
8
8
  round?: boolean;
9
9
  a?: boolean;
10
+ to?: string;
10
11
  auto?: boolean;
11
12
  effect?: boolean;
12
13
  disabled?: boolean;
@@ -13,16 +13,6 @@ var CompactButton = function CompactButton(_ref) {
13
13
  style = _ref.style,
14
14
  onClick = _ref.onClick;
15
15
  var theme = useTheme();
16
- // if (a) {
17
- // return (
18
- // <Button icon={icon} style={{
19
- // ...style,
20
- // backgroundColor: theme.palette.background
21
- // }} type={type} onClick={() => window.open(to, target)} auto scale={scale} px={0.6} iconRight={iconRight}>
22
- // {children}
23
- // </Button>
24
- // );
25
- // }
26
16
  return /*#__PURE__*/React.createElement(Button, {
27
17
  icon: icon,
28
18
  style: _extends({}, style, {
@@ -0,0 +1,17 @@
1
+ import React, { CSSProperties } from 'react';
2
+ import { ButtonTypes } from 'components/button-group';
3
+ type SmallButtonProps = {
4
+ children?: React.ReactNode;
5
+ iconRight?: React.ReactNode;
6
+ to: string;
7
+ icon?: React.ReactNode;
8
+ scale?: number;
9
+ type?: any;
10
+ style?: CSSProperties;
11
+ a?: boolean;
12
+ target?: string;
13
+ color?: ButtonTypes;
14
+ onClick?: () => void;
15
+ };
16
+ declare const _default: React.NamedExoticComponent<SmallButtonProps>;
17
+ export default _default;
@@ -0,0 +1,29 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import React, { memo } from 'react';
3
+ import Button from './button';
4
+ import { useTheme } from '@helpdice/theme';
5
+ var SmallButton = function SmallButton(_ref) {
6
+ var _color = _ref.color,
7
+ children = _ref.children,
8
+ iconRight = _ref.iconRight,
9
+ icon = _ref.icon,
10
+ _ref$scale = _ref.scale,
11
+ scale = _ref$scale === void 0 ? 2 / 3 : _ref$scale,
12
+ type = _ref.type,
13
+ style = _ref.style,
14
+ onClick = _ref.onClick;
15
+ var theme = useTheme();
16
+ return /*#__PURE__*/React.createElement(Button, {
17
+ icon: icon,
18
+ style: _extends({}, style, {
19
+ backgroundColor: theme.palette.background
20
+ }),
21
+ type: type,
22
+ onClick: onClick,
23
+ auto: true,
24
+ scale: scale,
25
+ py: 0.6,
26
+ iconRight: iconRight
27
+ }, children);
28
+ };
29
+ export default /*#__PURE__*/memo(SmallButton);
@@ -1,9 +1,11 @@
1
1
  import Button from './button';
2
- import CompactButton from './button.compact';
2
+ import IconButton from './button.icon';
3
+ import SmallButton from './button.small';
3
4
  export type { ButtonProps } from './button';
4
5
  export type { ButtonTypes } from '../utils/prop-types';
5
6
  export type ButtonComponentType = typeof Button & {
6
- Compact: typeof CompactButton;
7
+ Icon: typeof IconButton;
8
+ Small: typeof SmallButton;
7
9
  };
8
10
  declare const _default: ButtonComponentType;
9
11
  export default _default;
@@ -1,6 +1,8 @@
1
1
  /* "use client" */
2
2
 
3
3
  import Button from './button';
4
- import CompactButton from './button.compact';
5
- Button.Compact = CompactButton;
4
+ import IconButton from './button.icon';
5
+ import SmallButton from './button.small';
6
+ Button.Icon = IconButton;
7
+ Button.Small = SmallButton;
6
8
  export default Button;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helpdice/ui",
3
- "version": "2.3.5",
3
+ "version": "2.3.6",
4
4
  "main": "dist/index.js",
5
5
  "types": "esm/index.d.ts",
6
6
  "unpkg": "dist/index.min.js",