Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit 742d81e

Browse files
committed
fixed list item styles and removed redundancy
1 parent a5e1ff2 commit 742d81e

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

packages/react/src/themes/teams/components/Dropdown/dropdownItemStyles.ts

+6-12
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
import { ComponentSlotStylesInput, ICSSInJSStyle } from '../../../types'
22
import { DropdownVariables } from './dropdownVariables'
33
import { DropdownItemProps } from '../../../../components/Dropdown/DropdownItem'
4-
import ListItem from '../../../../components/List/ListItem'
54

65
const dropdownItemStyles: ComponentSlotStylesInput<DropdownItemProps, DropdownVariables> = {
7-
root: ({ variables: v, props: { active } }): ICSSInJSStyle => ({
8-
[`&.${ListItem.className}`]: {
9-
backgroundColor: v.listItemBackgroundColor,
10-
whiteSpace: 'nowrap',
11-
},
12-
13-
...(active && {
14-
[`&.${ListItem.className}`]: {
15-
backgroundColor: v.listItemBackgroundColorActive,
16-
color: v.listItemColorActive,
17-
},
6+
root: ({ props: p, variables: v }): ICSSInJSStyle => ({
7+
whiteSpace: 'nowrap',
8+
backgroundColor: v.listItemBackgroundColor,
9+
...(p.active && {
10+
color: v.listItemColorActive,
11+
backgroundColor: v.listItemBackgroundColorActive,
1812
}),
1913
}),
2014
}

0 commit comments

Comments
 (0)