File tree Expand file tree Collapse file tree 4 files changed +14
-4
lines changed Expand file tree Collapse file tree 4 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export default function NavSection(props: Props): JSX.Element {
1212 return (
1313 < div className = 'nav-section' >
1414 { separator && < div className = 'divider' /> }
15- { title && < span className = ' nav-section--title' > { title } </ span > }
15+ { title && < span className = { ` nav-section--title ${ separator ? '' : 'no-separator' } ` } > { title } </ span > }
1616 </ div >
1717 ) ;
1818}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ const useStyles = makeStyles((theme: Theme) => ({
2525 } ,
2626 navBarTop : {
2727 display : 'flex' ,
28- justifyContent : 'end ' ,
28+ justifyContent : 'start ' ,
2929 } ,
3030} ) ) ;
3131
Original file line number Diff line number Diff line change 3737 color : $tw-clr-txt ;
3838 display : block ;
3939 margin-top : $tw-spc-base-small ;
40+
41+ & .no-separator {
42+ margin-top : 0 ;
43+ }
4044 }
4145 }
4246
Original file line number Diff line number Diff line change @@ -14,14 +14,15 @@ export default {
1414 } ,
1515} ;
1616
17- const Template : Story < NavbarProps > = ( args ) => {
17+ const Template = ( args : NavbarProps & { title ?: boolean } ) => {
1818 const [ selectedItem , setSelectedItem ] = React . useState ( 'accessions' ) ;
1919
2020 // tslint:disable-next-line:no-empty
2121 const showNavbar = ( show : any ) => { } ;
2222
2323 return (
2424 < Navbar setShowNavBar = { showNavbar } backgroundTransparent = { args . backgroundTransparent } >
25+ { args . title && < NavSection title = 'Account' separator = { false } /> }
2526 < NavItem label = 'Home' icon = 'home' selected = { selectedItem === 'home' } onClick = { ( ) => setSelectedItem ( 'home' ) } />
2627 < NavItem label = 'Species' icon = 'species' selected = { selectedItem === 'species' } onClick = { ( ) => setSelectedItem ( 'species' ) } />
2728 < NavSection />
@@ -55,4 +56,9 @@ const Template: Story<NavbarProps> = (args) => {
5556 ) ;
5657} ;
5758
58- export const Default = Template . bind ( { } ) ;
59+ const WithoutTitle : Story < NavbarProps > = ( args ) => ( < Template { ...args } /> ) ;
60+ const WithTitle : Story < NavbarProps > = ( args ) => ( < Template { ...args } title = { true } /> ) ;
61+
62+ export const Default = WithoutTitle . bind ( { } ) ;
63+
64+ export const Title = WithTitle . bind ( { } ) ;
You can’t perform that action at this time.
0 commit comments