Skip to content

Commit

Permalink
Merge pull request #1303 from dxc-technology/fix-1277
Browse files Browse the repository at this point in the history
Update component's size fitContent
  • Loading branch information
Jialecl committed Oct 3, 2022
2 parents 9885dbb + 250d3f1 commit 61a8ced
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/src/alert/Alert.tsx
Expand Up @@ -114,7 +114,7 @@ const sizes = {
medium: "480px",
large: "820px",
fillParent: "100%",
fitContent: "auto",
fitContent: "fit-content",
};

const calculateWidth = (margin, size) =>
Expand Down
2 changes: 1 addition & 1 deletion lib/src/box/Box.tsx
Expand Up @@ -30,7 +30,7 @@ const sizes = {
medium: "240px",
large: "480px",
fillParent: "100%",
fitContent: "unset",
fitContent: "fit-content",
};

const calculateWidth = (margin, size, padding) => {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/checkbox/Checkbox.tsx
Expand Up @@ -113,7 +113,7 @@ const sizes = {
medium: "240px",
large: "480px",
fillParent: "100%",
fitContent: "unset",
fitContent: "fit-content",
};

const calculateWidth = (margin, size) => {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/dropdown/Dropdown.tsx
Expand Up @@ -141,7 +141,7 @@ const DxcDropdown = ({
},
[onSelectOption, visualFocusIndex, options]
);

useLayoutEffect(() => {
const visualFocusedMenuItem = menuRef?.current?.querySelectorAll("[role='menuitem']")[visualFocusIndex];
visualFocusedMenuItem?.scrollIntoView?.({ block: "nearest", inline: "start" });
Expand Down Expand Up @@ -229,7 +229,7 @@ const sizes = {
medium: "240px",
large: "480px",
fillParent: "100%",
fitContent: "unset",
fitContent: "fit-content",
};

const calculateWidth = (margin, size) =>
Expand Down
2 changes: 1 addition & 1 deletion lib/src/switch/Switch.tsx
Expand Up @@ -132,7 +132,7 @@ const sizes = {
medium: "240px",
large: "480px",
fillParent: "100%",
fitContent: "unset",
fitContent: "fit-content",
};

const calculateWidth = (margin, size) =>
Expand Down
2 changes: 1 addition & 1 deletion lib/src/tag/Tag.tsx
Expand Up @@ -68,7 +68,7 @@ const sizes = {
medium: "240px",
large: "480px",
fillParent: "100%",
fitContent: "unset",
fitContent: "fit-content",
};

const calculateWidth = (margin, size) =>
Expand Down

0 comments on commit 61a8ced

Please sign in to comment.