Skip to content

Commit 53c59ea

Browse files
author
Kubit
committed
Update styles and typescript
1 parent 98221a1 commit 53c59ea

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

src/components/input/utils/extraStyles.utils.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ const getRightExtraStyles = (
3636
const getTopExtraStyles = (
3737
affixPosition?: POSITIONS,
3838
width?: number,
39-
isOutAffixPosition?: boolean
39+
isOutAffixPosition?: boolean,
40+
inputWidth?: number
4041
): CSSProp | undefined => {
4142
if (affixPosition === POSITIONS.LEFT && isOutAffixPosition) {
42-
return labelInTopStyles(width || 0);
43+
return labelInTopStyles(width || 0, inputWidth || 0);
4344
}
4445
return undefined;
4546
};
@@ -77,7 +78,8 @@ export const getExtraStyles = (
7778
affixPosition?: POSITIONS,
7879
width?: number,
7980
isOutAffixPosition?: boolean,
80-
helpTextPosition?: InputHelpMessagePosition
81+
helpTextPosition?: InputHelpMessagePosition,
82+
inputWidth?: number
8183
): CSSProp | undefined => {
8284
if (stylesPosition === POSITIONS.LEFT) {
8385
return getLeftExtraStyles(affixPosition, isOutAffixPosition);
@@ -86,7 +88,7 @@ export const getExtraStyles = (
8688
return getRightExtraStyles(affixPosition, isOutAffixPosition);
8789
}
8890
if (stylesPosition === POSITIONS.TOP) {
89-
return getTopExtraStyles(affixPosition, width, isOutAffixPosition);
91+
return getTopExtraStyles(affixPosition, width, isOutAffixPosition, inputWidth);
9092
}
9193
if (stylesPosition === POSITIONS.BOTTOM) {
9294
return getBottomExtraStyles(affixPosition, width, isOutAffixPosition, helpTextPosition);

src/components/modal/modalControlled.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ const CONTAINER_STYLES_EDIT: CssProperty[] = [
1515
{ cssPropertyName: 'overflow-y', cssPropertyValue: 'auto' },
1616
];
1717
const CONTENT_STYLES_EDIT: CssProperty[] = [
18-
{ cssPropertyName: 'overflow-y', cssPropertyValue: 'unset' },
19-
{ cssPropertyName: 'max-height', cssPropertyValue: 'unset' },
18+
{ cssPropertyName: 'overflow-y', cssPropertyValue: 'visible' },
2019
];
2120

2221
const ModalControlledComponent = React.forwardRef(

src/components/modal/stories/modal.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const Modal: Story = {
3939
open: true,
4040
closeIcon: { icon: ICONS.ICON_CLOSE },
4141
footer: {
42-
variant: Object.values(variantsObject[themeSelected].FooterVariant || {})[0] as string,
42+
variant: Object.values(variantsObject[themeSelected].FooterVariants || {})[0] as string,
4343
content: [
4444
<ReplaceContent key={0} data-position={FooterPositionType.LEFT} width={'100%'}>
4545
Footer content
@@ -79,7 +79,7 @@ export const ModalWithCtv: Story = {
7979
open: true,
8080
closeIcon: { icon: ICONS.ICON_CLOSE },
8181
footer: {
82-
variant: Object.values(variantsObject[themeSelected].FooterVariant || {})[0] as string,
82+
variant: Object.values(variantsObject[themeSelected].FooterVariants || {})[0] as string,
8383
content: [
8484
<ReplaceContent key={0} data-position={FooterPositionType.LEFT} width={'100%'}>
8585
Footer content

0 commit comments

Comments
 (0)