From a44090d4af28f958cad98c0f8f45c56b74a02b3e Mon Sep 17 00:00:00 2001 From: tom Date: Wed, 24 Jun 2026 10:10:46 -0400 Subject: [PATCH 1/6] update dropdown menu styles --- src/components/DropdownMenu.stories.tsx | 30 +++++++++++++++++++++++++ src/components/DropdownMenu.tsx | 22 ++++++++++-------- 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/src/components/DropdownMenu.stories.tsx b/src/components/DropdownMenu.stories.tsx index eb4c68183..1b8d1566e 100644 --- a/src/components/DropdownMenu.stories.tsx +++ b/src/components/DropdownMenu.stories.tsx @@ -34,6 +34,36 @@ const Menus = (variant: 'light' | 'primary' | 'secondary') => { Export grades to .csv + +
+ + + + Browse subjects + + + View all textbooks + + + About OpenStax + + + +
+ +
+ + + Browse subjects + + + View all textbooks + + + About OpenStax + + +
; }; diff --git a/src/components/DropdownMenu.tsx b/src/components/DropdownMenu.tsx index 97374f159..1ddafd546 100644 --- a/src/components/DropdownMenu.tsx +++ b/src/components/DropdownMenu.tsx @@ -14,15 +14,15 @@ const StyledButton = styled(Button)<{ variant: ButtonVariant; width?: string }>` flex-direction: row; font-size: 1.6rem; position: relative; - justify-content: center; + justify-content: space-between; line-height: 2rem; min-height: 2.5rem; - padding: 0 1.5rem 0 0.5rem; + padding: 1rem 2.5rem 1rem 1rem; text-align: left; text-decoration: none; transition: all 0.2s ease-in-out; user-select: none; - ${(props) => props.width ? `width: ${props.width}` : null} + ${(props) => props.width ? `width: ${props.width};` : null} -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; @@ -40,11 +40,11 @@ const StyledButton = styled(Button)<{ variant: ButtonVariant; width?: string }>` content: ' '; display: block; position: absolute; - height: 0.5rem; + height: 0.6rem; margin-top: -0.25rem; - right: 0.5rem; + right: 1rem; transform: rotate(135deg); - width: 0.5rem; + width: 0.6rem; } `; @@ -52,22 +52,25 @@ const StyledMenu = styled(Menu)` margin-top: -0.6rem; background-color: ${palette.white}; border: 0.1rem solid ${palette.pale}; - padding: 0.3rem 0; + padding: 0; cursor: pointer; color: ${palette.black}; [role="menuitem"] { + display: block; + color: inherit; + text-decoration: none; font-size: 1.6rem; min-height: 2.5rem; line-height: 2rem; - padding: 0 0.5rem; + padding: 1rem 0.5rem; cursor: pointer; transition: all 0.2s ease-in-out; -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; &:hover { - background-color: ${palette.pale}; + background-color: ${palette.neutralLighter}; } } `; @@ -82,6 +85,7 @@ interface DropdownMenuButtonProps extends MenuProps, Omit( { text, children, variant, width, disabled, ...props }: DropdownMenuButtonProps ) => { + console.log('width', width); return ( {text} From c90dada8d344635548fd4d9389bd7b3fa27ec0ba Mon Sep 17 00:00:00 2001 From: tom Date: Wed, 24 Jun 2026 10:12:10 -0400 Subject: [PATCH 2/6] remove debug --- src/components/DropdownMenu.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/DropdownMenu.tsx b/src/components/DropdownMenu.tsx index 1ddafd546..a81b132d2 100644 --- a/src/components/DropdownMenu.tsx +++ b/src/components/DropdownMenu.tsx @@ -85,7 +85,6 @@ interface DropdownMenuButtonProps extends MenuProps, Omit( { text, children, variant, width, disabled, ...props }: DropdownMenuButtonProps ) => { - console.log('width', width); return ( {text} From ac311368d0c792bd7222cfcdf5e36e88050e6faf Mon Sep 17 00:00:00 2001 From: tom Date: Wed, 24 Jun 2026 10:13:58 -0400 Subject: [PATCH 3/6] bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1708693d2..2bec0f831 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openstax/ui-components", - "version": "1.22.2", + "version": "1.22.3", "license": "MIT", "sideEffects": [ "**/*.css" From d45329d99ba852f1d4e2206f49a78645a7e648e2 Mon Sep 17 00:00:00 2001 From: tom Date: Wed, 24 Jun 2026 10:15:19 -0400 Subject: [PATCH 4/6] :camera: --- src/components/__snapshots__/DropdownMenu.spec.tsx.snap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/__snapshots__/DropdownMenu.spec.tsx.snap b/src/components/__snapshots__/DropdownMenu.spec.tsx.snap index dc61d042d..46cc2fd1b 100644 --- a/src/components/__snapshots__/DropdownMenu.spec.tsx.snap +++ b/src/components/__snapshots__/DropdownMenu.spec.tsx.snap @@ -5,7 +5,7 @@ exports[`DropdownMenu matches snapshots 1`] = ` - + {children} - + ); diff --git a/src/components/__snapshots__/DropdownMenu.spec.tsx.snap b/src/components/__snapshots__/DropdownMenu.spec.tsx.snap index 46cc2fd1b..0fe8ff0f7 100644 --- a/src/components/__snapshots__/DropdownMenu.spec.tsx.snap +++ b/src/components/__snapshots__/DropdownMenu.spec.tsx.snap @@ -5,10 +5,11 @@ exports[`DropdownMenu matches snapshots 1`] = `