From 8657f710c8de65bedd21dd786bfa04017dc1fd8d Mon Sep 17 00:00:00 2001 From: agonzalez97 Date: Thu, 22 Sep 2022 16:53:30 +0200 Subject: [PATCH 1/2] Changed value fitContent prop --- lib/src/alert/Alert.tsx | 2 +- lib/src/box/Box.tsx | 2 +- lib/src/dropdown/Dropdown.tsx | 4 ++-- lib/src/switch/Switch.tsx | 2 +- lib/src/tag/Tag.tsx | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/src/alert/Alert.tsx b/lib/src/alert/Alert.tsx index d4311eed6..84985c259 100644 --- a/lib/src/alert/Alert.tsx +++ b/lib/src/alert/Alert.tsx @@ -114,7 +114,7 @@ const sizes = { medium: "480px", large: "820px", fillParent: "100%", - fitContent: "auto", + fitContent: "fit-content", }; const calculateWidth = (margin, size) => diff --git a/lib/src/box/Box.tsx b/lib/src/box/Box.tsx index de94a1c06..f34627024 100644 --- a/lib/src/box/Box.tsx +++ b/lib/src/box/Box.tsx @@ -30,7 +30,7 @@ const sizes = { medium: "240px", large: "480px", fillParent: "100%", - fitContent: "unset", + fitContent: "fit-content", }; const calculateWidth = (margin, size, padding) => { diff --git a/lib/src/dropdown/Dropdown.tsx b/lib/src/dropdown/Dropdown.tsx index b8e26ed3c..89e11e0cd 100644 --- a/lib/src/dropdown/Dropdown.tsx +++ b/lib/src/dropdown/Dropdown.tsx @@ -141,7 +141,7 @@ const DxcDropdown = ({ }, [onSelectOption, visualFocusIndex, options] ); - + useLayoutEffect(() => { const visualFocusedMenuItem = menuRef?.current?.querySelectorAll("[role='menuitem']")[visualFocusIndex]; visualFocusedMenuItem?.scrollIntoView?.({ block: "nearest", inline: "start" }); @@ -229,7 +229,7 @@ const sizes = { medium: "240px", large: "480px", fillParent: "100%", - fitContent: "unset", + fitContent: "fit-content", }; const calculateWidth = (margin, size) => diff --git a/lib/src/switch/Switch.tsx b/lib/src/switch/Switch.tsx index c61a36c64..550a70623 100644 --- a/lib/src/switch/Switch.tsx +++ b/lib/src/switch/Switch.tsx @@ -132,7 +132,7 @@ const sizes = { medium: "240px", large: "480px", fillParent: "100%", - fitContent: "unset", + fitContent: "fit-content", }; const calculateWidth = (margin, size) => diff --git a/lib/src/tag/Tag.tsx b/lib/src/tag/Tag.tsx index c22f551ff..d93110a0f 100644 --- a/lib/src/tag/Tag.tsx +++ b/lib/src/tag/Tag.tsx @@ -68,7 +68,7 @@ const sizes = { medium: "240px", large: "480px", fillParent: "100%", - fitContent: "unset", + fitContent: "fit-content", }; const calculateWidth = (margin, size) => From 250d3f14707f344d8c1429389499eb487efb289b Mon Sep 17 00:00:00 2001 From: agonzalez97 Date: Fri, 23 Sep 2022 12:25:23 +0200 Subject: [PATCH 2/2] Updated fitContent in checkbox --- lib/src/checkbox/Checkbox.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/checkbox/Checkbox.tsx b/lib/src/checkbox/Checkbox.tsx index 7bfc1fe10..64cec3d36 100644 --- a/lib/src/checkbox/Checkbox.tsx +++ b/lib/src/checkbox/Checkbox.tsx @@ -119,7 +119,7 @@ const sizes = { medium: "240px", large: "480px", fillParent: "100%", - fitContent: "unset", + fitContent: "fit-content", }; const calculateWidth = (margin, size) => {