# NavBar

## Import

```typescript
import NavBar from 'MaestroMobileSDK/NavBar';
```

## Usage

```typescript
import NavBar from 'MaestroMobileSDK/NavBar';
export function NavBarTest{
	const [openNavbar, setOpennavbar] = useState(false);
	const  navigation = useNavigation();
	const  openWebView = (item: any) => {
		// Navigating to the screen with webview
		navigation.navigate('nav-web-view', {url:  item.link, title:  item.text});
	};
	return <NavBar
			open={openWebView}
			onClose={() => {
				setOpennavbar(false);
			}}
			onOpenLink={onClickItem}
			/>
}
```

## Props

| Name       | Type                                   | Default | Description                                              |
| ---------- | -------------------------------------- | ------- | -------------------------------------------------------- |
| open       | `boolean`                              |         | if `true` navbar is open                                 |
| onClose    | `() => void`                           |         | Callback fired when the component requests to be closed. |
| onOpenLink | `onOpenLink: (item: SubItem) => void;` |         | Callback fired when a link is pressed                    |
