@ttoss/ui 1.23.0 → 1.23.1

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/dist/esm/index.js CHANGED
@@ -186,10 +186,12 @@ import { Radio } from "theme-ui";
186
186
  // src/components/Icon/Icon.tsx
187
187
  import { Icon as IconUI } from "@iconify/react";
188
188
  import { jsx as jsx3 } from "react/jsx-runtime";
189
- var Icon = ({ icon, sx }) => {
189
+ var Icon = ({ icon, sx, iconProps, ...props }) => {
190
190
  return /* @__PURE__ */ jsx3(Text, {
191
191
  sx,
192
+ ...props,
192
193
  children: /* @__PURE__ */ jsx3(IconUI, {
194
+ ...iconProps,
193
195
  icon
194
196
  })
195
197
  });
package/dist/index.d.ts CHANGED
@@ -19,10 +19,10 @@ declare const useTheme: () => theme_ui.ThemeUIContextValue;
19
19
 
20
20
  declare const Button: (props: ButtonProps) => JSX.Element;
21
21
 
22
- declare type IconProps = {
22
+ declare type IconProps = TextProps & {
23
23
  icon: IconProps$1['icon'];
24
- sx?: TextProps['sx'];
24
+ iconProps?: Omit<IconProps$1, 'icon'>;
25
25
  };
26
- declare const Icon: ({ icon, sx }: IconProps) => JSX.Element;
26
+ declare const Icon: ({ icon, sx, iconProps, ...props }: IconProps) => JSX.Element;
27
27
 
28
28
  export { Button, Icon, IconProps, ThemeProvider, ThemeProviderProps, useTheme };
package/dist/index.js CHANGED
@@ -237,10 +237,12 @@ var import_theme_ui18 = require("theme-ui");
237
237
  // src/components/Icon/Icon.tsx
238
238
  var import_react2 = require("@iconify/react");
239
239
  var import_jsx_runtime3 = require("react/jsx-runtime");
240
- var Icon = ({ icon, sx }) => {
240
+ var Icon = ({ icon, sx, iconProps, ...props }) => {
241
241
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_theme_ui15.Text, {
242
242
  sx,
243
+ ...props,
243
244
  children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react2.Icon, {
245
+ ...iconProps,
244
246
  icon
245
247
  })
246
248
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/ui",
3
- "version": "1.23.0",
3
+ "version": "1.23.1",
4
4
  "description": "Primitive layout, typographic, and other components for styling applications.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "ttoss",
@@ -45,5 +45,5 @@
45
45
  "publishConfig": {
46
46
  "access": "public"
47
47
  },
48
- "gitHead": "e2b509ee8717f07f7365191b651dcbb5f080e05a"
48
+ "gitHead": "e9c6b47f9b2ff9a44358a16c9feff84ba9342346"
49
49
  }
@@ -1,15 +1,15 @@
1
1
  import { IconProps as IconPropsUI, Icon as IconUI } from '@iconify/react';
2
2
  import { Text, TextProps } from '../Text/Text';
3
3
 
4
- export type IconProps = {
4
+ export type IconProps = TextProps & {
5
5
  icon: IconPropsUI['icon'];
6
- sx?: TextProps['sx'];
6
+ iconProps?: Omit<IconPropsUI, 'icon'>;
7
7
  };
8
8
 
9
- export const Icon = ({ icon, sx }: IconProps) => {
9
+ export const Icon = ({ icon, sx, iconProps, ...props }: IconProps) => {
10
10
  return (
11
- <Text sx={sx}>
12
- <IconUI icon={icon} />
11
+ <Text sx={sx} {...props}>
12
+ <IconUI {...iconProps} icon={icon} />
13
13
  </Text>
14
14
  );
15
15
  };