Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shellbar usage, documentation or github examples #1276

Open
ansujohn opened this issue Dec 2, 2020 · 2 comments
Open

Shellbar usage, documentation or github examples #1276

ansujohn opened this issue Dec 2, 2020 · 2 comments

Comments

@ansujohn
Copy link

ansujohn commented Dec 2, 2020

Description

I need couple of clarifications on Shellbar

  1. Change the background colour of Shellbar
    Tried this
    css file has
.header {
    background-color: black;
    color: white;
}

The tried to use that in Shellbar with no effect

<Shellbar
                className="header" ....

How can I change the background colour?

  1. I am trying to use Avatar for profile. I have installed
    "fiori-fundamentals": "^1.7.8",

and added this line in the index.css file
@import '../node_modules/fiori-fundamentals/dist/fiori-fundamentals.min.css';

<Shellbar
profile={<Avatar glyph='customer'/>}

but customer icon does not show up. Whats the right way to use icons in Avatar?

  1. backButton
    Is there a way to easily add a link to back button?
    <Link to='/home'></Link>

  2. On click of profile, I want to show a Popover, is there a way to do that?

Like
onProfileClick={handleProfileClick}

It would be really helpful if you can give some github code samples or more documentation.

Versions

fiori-fundamentals: 1.7.8
fundamental-react: 0.13.1


NOTE: Where applicable, please include uncropped screen captures.

DISCLAIMER:
After triaging an issue, the fundamental-react team will see if it can be reproduced or confirmed. If more information is needed, the fundamental-react team will contact the author. Any issues awaiting responses from the author for more than 7 days will be closed. The author can re-open the issue at a later time if they can present the requested information.

@github-actions
Copy link

github-actions bot commented Dec 2, 2020

Hello @ansujohn, thank you for using fundamental-react! The fundamental-react team will triage your issue as soon as possible.

@ansujohn
Copy link
Author

ansujohn commented Dec 2, 2020

I used Shellbar from @ui5/webcomponents-react and it worked with minimal code

import {ShellBar} from '@ui5/webcomponents-react/lib/ShellBar';
import {Avatar} from '@ui5/webcomponents-react/lib/Avatar';
import '@ui5/webcomponents-icons/dist/customer';
import '@ui5/webcomponents-icons/dist/nav-back';

<ShellBar
                logo={<img slot='logo' alt='logo' src='images/sap.png'/>}
                onLogoClick={function noRefCheck() {
                }}
                onProfileClick={handleProfileClick}
                primaryTitle="PRODUCTS"
                profile={<Avatar icon='customer'/>}
                startButton={<Link slot='startButton' to='/home'>
                    <ui5-button icon='nav-back' design='Transparent' style={{'color': 'white'}}
                                slot='startButton'/>
                </Link>}
                slot=""
                style={{'--sapShellColor': 'black'}}
                tooltip=""
            />

I want to port the above code to use fundamental-react.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant