@growth-angels/ds-core 1.19.0 → 1.20.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.
@@ -1,3 +1,2 @@
1
- import type { JSX } from "react/jsx-runtime";
2
1
  import type { ButtonProps } from "./Button.types";
3
- export declare const Button: <T extends React.ElementType = "button">(props: ButtonProps<T>) => JSX.Element;
2
+ export declare const Button: <T extends React.ElementType = "button">(props: ButtonProps<T>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
@@ -1,3 +1,2 @@
1
- import type { JSX } from "react/jsx-runtime";
2
1
  import type { CardProps } from "./Card.types";
3
- export declare const Card: ({ children, variant, extraClassNames, type, style, backgroundImage, }: CardProps) => JSX.Element;
2
+ export declare const Card: ({ children, variant, extraClassNames, type, style, backgroundImage }: CardProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- export const Card = ({ children, variant = "primary", extraClassNames, type = "image", style, backgroundImage, }) => {
2
+ export const Card = ({ children, variant = "primary", extraClassNames, type = "image", style, backgroundImage }) => {
3
3
  const classNames = ["ga-ds-card", `ga-ds-card--${variant}`, `ga-ds-card--${type}`, ...(extraClassNames || [])];
4
4
  return (_jsxs("div", { ...(style && { style }), className: classNames.join(" "), children: [backgroundImage && _jsx("img", { src: backgroundImage.sizes?.full?.url, alt: backgroundImage?.alt }), children] }));
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@growth-angels/ds-core",
3
- "version": "1.19.0",
3
+ "version": "1.20.0",
4
4
  "description": "Design system by Growth Angels",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -1,9 +1,8 @@
1
- import type { JSX } from "react/jsx-runtime"
2
1
  import type { ButtonProps } from "./Button.types"
3
2
  import { useReactAdapter } from "../../hooks/useReactAdaptater"
4
3
  import { Icon } from "../Icon/Icon"
5
4
 
6
- export const Button = <T extends React.ElementType = "button">(props: ButtonProps<T>): JSX.Element => {
5
+ export const Button = <T extends React.ElementType = "button">(props: ButtonProps<T>) => {
7
6
  const React = useReactAdapter()
8
7
  const { as, children, variant, preventDefault, icon, extraClassNames, ...restProps } = props
9
8
  let customVariant = variant
@@ -1,14 +1,6 @@
1
- import type { JSX } from "react/jsx-runtime"
2
1
  import type { CardProps } from "./Card.types"
3
2
 
4
- export const Card = ({
5
- children,
6
- variant = "primary",
7
- extraClassNames,
8
- type = "image",
9
- style,
10
- backgroundImage,
11
- }: CardProps): JSX.Element => {
3
+ export const Card = ({ children, variant = "primary", extraClassNames, type = "image", style, backgroundImage }: CardProps) => {
12
4
  const classNames = ["ga-ds-card", `ga-ds-card--${variant}`, `ga-ds-card--${type}`, ...(extraClassNames || [])]
13
5
  return (
14
6
  <div {...(style && { style })} className={classNames.join(" ")}>