Skip to content

Commit 4ffcbce

Browse files
author
chenyueban
committed
fix(Command): Fix problems not displayed by Secondary
1 parent 91c2730 commit 4ffcbce

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

packages/fluent-ui/src/Command/Command.styled.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ export const StyledPrimary = styled.div`
2424
flex: 1;
2525
`
2626

27-
export const StyledSecondaryContainer = styled(Box).attrs({
28-
backgroundColor: th.color('standard.light2')
29-
})`
27+
export const StyledSecondaryContainer = styled(Box).attrs(
28+
(props): any => ({
29+
backgroundColor: th.color('standard.light2').call(undefined, props)
30+
})
31+
)`
3032
display: flex;
3133
flex-direction: column;
3234
width: 130px;

packages/fluent-ui/src/Command/Command.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ const Command = React.forwardRef<HTMLDivElement, CommandProps>(
6565
const position = {
6666
position: 'absolute',
6767
left: `${rect.left + window.scrollX}px`,
68-
top: `${rect.top + window.scrollY + rect.height}px`
68+
top: `${rect.top + window.scrollY + rect.height}px`,
69+
zIndex: 9999
6970
}
7071
setSecondaryVisible((visible: boolean): boolean => !visible)
7172
setPortalStyle(position)

0 commit comments

Comments
 (0)