@delightui/components 0.1.7 → 0.1.8

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/App.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import './resources/themes/base.css';
3
3
  import './resources/themes/dark.css';
4
- import './custom.css';
4
+ import './resources/themes/custom.css';
5
5
  declare function App(): React.JSX.Element;
6
6
  export default App;
@@ -1,5 +1,6 @@
1
1
  import type { HTMLAttributes, ReactNode } from 'react';
2
- export type ActionCardProps = HTMLAttributes<HTMLDivElement> & {
2
+ import { LinkProps } from 'react-router-dom';
3
+ export type ActionCardProps = HTMLAttributes<HTMLDivElement> & Omit<LinkProps, 'to'> & {
3
4
  /**
4
5
  * The content to be displayed within the action card.
5
6
  */
@@ -13,4 +14,17 @@ export type ActionCardProps = HTMLAttributes<HTMLDivElement> & {
13
14
  * Additional class for styling.
14
15
  */
15
16
  className?: string;
17
+ /**
18
+ * The destination URL or path for the navigation link.
19
+ * If the URL starts with "https", it will be treated as an external link and rendered as an <a> tag.
20
+ * Otherwise, it will be treated as an internal link and rendered as a <RouterNavLink> component.
21
+ *
22
+ * @example
23
+ * // Internal link
24
+ * <NavLink to="/home">Home</NavLink>
25
+ *
26
+ * // External link
27
+ * <NavLink to="https://www.example.com">External</NavLink>
28
+ */
29
+ to?: string | -1;
16
30
  };
@@ -1,9 +1,20 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { ButtonProps } from '../Button/Button.types';
3
3
  export type IconButtonStyleEnum = 'Primary' | 'Secondary';
4
- export interface IconButtonProps extends Omit<ButtonProps, 'leadingIcon' | 'trailingIcon'> {
4
+ export type IconButtonSizeEnum = 'Small' | 'Medium';
5
+ export interface IconButtonProps extends Omit<ButtonProps, 'leadingIcon' | 'trailingIcon' | 'style' | 'size'> {
5
6
  /**
6
7
  * The icon to be displayed.
7
8
  */
8
9
  icon?: ReactNode;
10
+ /**
11
+ * Style of the button.
12
+ * @default 'Primary'
13
+ */
14
+ style?: IconButtonStyleEnum;
15
+ /**
16
+ * Size of the button.
17
+ * @default 'Medium'
18
+ */
19
+ size?: IconButtonSizeEnum;
9
20
  }