2525 */
2626
2727import styled from 'styled-components'
28- import { StyledIconBase } from '@styled-icons/styled-icon'
2928import { AccordionDisclosureStyle } from '../Accordion/AccordionDisclosure'
3029import { TextBase } from '../Text/TextBase'
3130import { ListItemDetail } from '../List/ListItemDetail'
32- import { List , ListItemLabel } from '../List'
31+ import { List , ListItem , ListItemLabel } from '../List'
32+ import { ListItemIconPlacement } from '../List/ListItemLayout'
3333
3434/**
3535 * `NavList` is a variation of `List`
3636 * - `ListItem` border-radius circular on the right side
3737 * - `ListItem` selected or "active"
3838 * - text color is `keyColor`
3939 * - background color is `keySubtle`
40+ * - `ListItem` at the root are indented to align properly with `Tree`(s) at the root as well
4041 *
4142 *
4243 * @status : EXPERIMENTAL
@@ -45,18 +46,22 @@ import { List, ListItemLabel } from '../List'
4546 * SemVer major version change. _It is not recommended to use this component
4647 * at this time.
4748 */
48-
49- export const NavList = styled ( List ) `
49+ export const NavList = styled ( List ) . attrs ( ( { color = 'key' } ) => ( { color } ) ) `
5050 ${ AccordionDisclosureStyle } , ${ ListItemLabel } {
5151 border-bottom-right-radius: 5rem;
5252 border-top-right-radius: 5rem;
5353
5454 &[aria-selected='true'] {
55- background-color: ${ ( { theme } ) => theme . colors . keySubtle } ;
56- color: ${ ( { theme } ) => theme . colors . key } ;
57- ${ ListItemDetail } , ${ StyledIconBase } , ${ TextBase } {
55+ ${ ListItemDetail } ,
56+ ${ TextBase } ,
57+ ${ ListItemIconPlacement } svg {
5858 color: ${ ( { theme } ) => theme . colors . key } ;
5959 }
6060 }
6161 }
62+ & > ${ ListItem } {
63+ ${ ListItemLabel } {
64+ padding-left: ${ ( { theme } ) => `${ theme . sizes . medium } ` } ;
65+ }
66+ }
6267`
0 commit comments