Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
feat(Navbar): remove search from navbar (#2237)
Browse files Browse the repository at this point in the history
  • Loading branch information
kilcorse-michael committed Jul 16, 2020
1 parent 8a471d8 commit 0c85e24
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
20 changes: 0 additions & 20 deletions src/__tests__/shared/components/navbar/Navbar.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,26 +122,6 @@ describe('Navbar', () => {
})
})

describe('search', () => {
it('should render Search as the search box placeholder', () => {
const wrapper = setup(allPermissions)
const hospitalRunNavbar = wrapper.find(HospitalRunNavbar)
const navSearch = hospitalRunNavbar.find('.nav-search')
const { children } = navSearch.first().props() as any

expect(children.props.children[0].props.placeholder).toEqual('actions.search')
})

it('should render Search as the search button label', () => {
const wrapper = setup(allPermissions)
const hospitalRunNavbar = wrapper.find(HospitalRunNavbar)
const navSearch = hospitalRunNavbar.find('.nav-search')
const { children } = navSearch.first().props() as any

expect(children.props.children[1].props.children).toEqual('actions.search')
})
})

describe('add new', () => {
it('should show a shortcut if user has a permission', () => {
const wrapper = setup(allPermissions)
Expand Down
11 changes: 1 addition & 10 deletions src/shared/components/navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,11 @@ const Navbar = () => {
},
className: 'nav-header',
},
{
type: 'search',
placeholderText: t('actions.search'),
className: 'ml-auto d-none d-md-block nav-search',
buttonText: t('actions.search'),
buttonColor: 'secondary',
onClickButton: () => undefined,
onChangeInput: () => undefined,
},
{
type: 'link-list-icon',
alignRight: true,
children: getDropdownListOfPages(addPages),
className: 'pl-4 nav-add-new d-none d-md-block',
className: 'ml-auto nav-add-new d-none d-md-block',
iconClassName: 'align-bottom',
label: 'Add',
name: 'add',
Expand Down

1 comment on commit 0c85e24

@vercel
Copy link

@vercel vercel bot commented on 0c85e24 Jul 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.