@myelmut/design-system 0.1.71 → 0.1.72
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/types/index.d.ts
CHANGED
|
@@ -587,7 +587,7 @@ declare interface ResponsiveImageProps {
|
|
|
587
587
|
fadeOnLoad?: boolean;
|
|
588
588
|
}
|
|
589
589
|
|
|
590
|
-
export declare const SimpleIllustratedCardButton: ({ label, layout, illustration, disabled, className, illustrationClassName, isActive, ...props }: SimpleIllustratedCardButtonProps) => JSX.Element;
|
|
590
|
+
export declare const SimpleIllustratedCardButton: ({ label, layout, illustration, disabled, isDisabled, className, illustrationClassName, isActive, ...props }: SimpleIllustratedCardButtonProps) => JSX.Element;
|
|
591
591
|
|
|
592
592
|
declare type SimpleIllustratedCardButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
593
593
|
label: string;
|
|
@@ -596,6 +596,7 @@ declare type SimpleIllustratedCardButtonProps = React.ButtonHTMLAttributes<HTMLB
|
|
|
596
596
|
className?: string;
|
|
597
597
|
illustrationClassName?: string;
|
|
598
598
|
isActive?: boolean;
|
|
599
|
+
isDisabled?: boolean;
|
|
599
600
|
};
|
|
600
601
|
|
|
601
602
|
declare type SingleDropdownMenuProps = CommonProps_2 & {
|
package/package.json
CHANGED
|
@@ -7,6 +7,7 @@ export type SimpleIllustratedCardButtonProps = React.ButtonHTMLAttributes<HTMLBu
|
|
|
7
7
|
className?: string;
|
|
8
8
|
illustrationClassName?: string;
|
|
9
9
|
isActive?: boolean;
|
|
10
|
+
isDisabled?: boolean;
|
|
10
11
|
};
|
|
11
12
|
|
|
12
13
|
const layoutStyles = {
|
|
@@ -19,7 +20,7 @@ const illustrationLayoutStyles = {
|
|
|
19
20
|
horizontal: 'max-md:h-full max-md:w-19 md:w-full',
|
|
20
21
|
};
|
|
21
22
|
|
|
22
|
-
export const SimpleIllustratedCardButton = ({ label, layout = 'vertical', illustration, disabled, className = '', illustrationClassName = '', isActive = false, ...props }: SimpleIllustratedCardButtonProps) => {
|
|
23
|
+
export const SimpleIllustratedCardButton = ({ label, layout = 'vertical', illustration, disabled, isDisabled = false, className = '', illustrationClassName = '', isActive = false, ...props }: SimpleIllustratedCardButtonProps) => {
|
|
23
24
|
// prettier-ignore
|
|
24
25
|
const buttonClasses = clsx(
|
|
25
26
|
"relative md:px-5 md:py-6 flex md:flex-col items-center overflow-hidden rounded-input bg-beige-dark text-claret-violet-dark transition-all duration-300 focus:outline-none cursor-pointer",
|
|
@@ -27,12 +28,12 @@ export const SimpleIllustratedCardButton = ({ label, layout = 'vertical', illust
|
|
|
27
28
|
"md:rounded-illustrated-card-button md:after:rounded-illustrated-card-button md:w-51.25 md:aspect-4/5",
|
|
28
29
|
layoutStyles[layout],
|
|
29
30
|
isActive && 'after:border-claret-violet-dark',
|
|
30
|
-
|
|
31
|
+
isDisabled && 'cursor-not-allowed opacity-50',
|
|
31
32
|
className,
|
|
32
33
|
);
|
|
33
34
|
|
|
34
35
|
return (
|
|
35
|
-
<button type="button" className={buttonClasses} {...props}>
|
|
36
|
+
<button type="button" className={buttonClasses} disabled={disabled} {...props}>
|
|
36
37
|
<span className="flex flex-col gap-2.5">
|
|
37
38
|
<span className="text-sm-mobile w-full font-semibold md:text-xl">{label}</span>
|
|
38
39
|
</span>
|