@norges-domstoler/dds-components 0.0.0-dev-20260605084148 → 0.0.0-dev-20260605084306
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/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -392,7 +392,7 @@ declare namespace Icon {
|
|
|
392
392
|
}
|
|
393
393
|
|
|
394
394
|
declare const Button: {
|
|
395
|
-
<I extends SvgIcon, T extends ElementType = "button">({ as: propAs, children, purpose, size, iconPosition, loading, loadingTooltip, fullWidth, icon, iconState, onClick, onFocus, onBlur, id, ref, className, style, htmlProps, ...props }: ButtonProps<I, T>): react.JSX.Element;
|
|
395
|
+
<I extends SvgIcon, T extends ElementType = "button">({ as: propAs, children, purpose, size: propSize, iconPosition, loading, loadingTooltip, fullWidth, icon, iconState, onClick, onFocus, onBlur, id, ref, className, style, htmlProps, ...props }: ButtonProps<I, T>): react.JSX.Element;
|
|
396
396
|
displayName: string;
|
|
397
397
|
};
|
|
398
398
|
|
package/dist/index.d.ts
CHANGED
|
@@ -392,7 +392,7 @@ declare namespace Icon {
|
|
|
392
392
|
}
|
|
393
393
|
|
|
394
394
|
declare const Button: {
|
|
395
|
-
<I extends SvgIcon, T extends ElementType = "button">({ as: propAs, children, purpose, size, iconPosition, loading, loadingTooltip, fullWidth, icon, iconState, onClick, onFocus, onBlur, id, ref, className, style, htmlProps, ...props }: ButtonProps<I, T>): react.JSX.Element;
|
|
395
|
+
<I extends SvgIcon, T extends ElementType = "button">({ as: propAs, children, purpose, size: propSize, iconPosition, loading, loadingTooltip, fullWidth, icon, iconState, onClick, onFocus, onBlur, id, ref, className, style, htmlProps, ...props }: ButtonProps<I, T>): react.JSX.Element;
|
|
396
396
|
displayName: string;
|
|
397
397
|
};
|
|
398
398
|
|
package/dist/index.js
CHANGED
|
@@ -4848,7 +4848,7 @@ var Button = ({
|
|
|
4848
4848
|
as: propAs,
|
|
4849
4849
|
children,
|
|
4850
4850
|
purpose = "primary",
|
|
4851
|
-
size:
|
|
4851
|
+
size: propSize = "medium",
|
|
4852
4852
|
iconPosition = "left",
|
|
4853
4853
|
loading,
|
|
4854
4854
|
loadingTooltip,
|
|
@@ -4875,11 +4875,12 @@ var Button = ({
|
|
|
4875
4875
|
const isIconButton = !hasLabel && hasIcon;
|
|
4876
4876
|
const isTextButton = hasLabel && !hasIcon;
|
|
4877
4877
|
const noContent = !hasLabel && !hasIcon;
|
|
4878
|
+
const size2 = groupSize != null ? groupSize : propSize;
|
|
4878
4879
|
const buttonCn = cn(
|
|
4879
4880
|
className,
|
|
4880
4881
|
Button_default.button,
|
|
4881
4882
|
Button_default[`button--${groupPurpose ? groupPurpose : purpose}`],
|
|
4882
|
-
Button_default[`button--${
|
|
4883
|
+
Button_default[`button--${size2}`],
|
|
4883
4884
|
isTextButton && Button_default["just-text"],
|
|
4884
4885
|
...hasLabelAndIcon ? [Button_default["with-text-and-icon"], Button_default[`with-icon-${iconPosition}`]] : [],
|
|
4885
4886
|
isIconButton && Button_default["just-icon"],
|