You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constmyOptions=[{'name': 'My-App','onClick': undefined,'clickable': false,'icon': '/logo.png'},{'name': 'Dashboard','onClick': ()=>{console.log('Landed on dashboard')},'clickable': true,'icon': '/dash.png'},{'name': 'Results','onClick': ()=>{console.log('Landed on results page')},'clickable': true,'icon': '/results.png'},{'name': 'Help','onClick': ()=>{console.log('Landed on help page')},'clickable': true,'icon': '/help.png'},]<Sidebaroptions={myOptions}/>
TypeScript
interfaceoption{name: string;//name to be displayed on the UIonClick: ()=>void|undefined;// function that will be called on clicking the optionclickable: boolean|undefined;// is the button clickableicon: string|undefined;// icon path}letmyOptions: option[]=[{'name': 'My-App','onClick': undefined,'clickable': false,'icon': '/logo.png'},{'name': 'Dashboard','onClick': ()=>{console.log('Landed on dashboard')},'clickable': true,'icon': '/dash.png'},{'name': 'Results','onClick': ()=>{console.log('Landed on results page')},'clickable': true,'icon': '/results.png'},{'name': 'Help','onClick': ()=>{console.log('Landed on help page')},'clickable': true,'icon': '/help.png'}]<Sidebaroptions={myOptions}/>
The fixing of the element to the side can be skipped, it just needs to have a height of 100vh;
The text was updated successfully, but these errors were encountered:
A sidebar component usually seen in dashboards.
The component must be this way:
Javascript
TypeScript
The fixing of the element to the side can be skipped, it just needs to have a height of 100vh;
The text was updated successfully, but these errors were encountered: