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

Add ability for ArcgisAccount to accept color and hoverColor prop wit… #464

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/ArcgisAccount/ArcgisAccount-styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ const StyledArcgisAccountControl = styled.div`

&:hover {
color: ${props => props.theme.palette.black};
box-shadow: inset 0 -3px 0 0 ${props => props.theme.palette.lighterBlue};
box-shadow: inset 0 -3px 0 0 ${props => (props.hoverColor ? props.hoverColor : props.theme.palette.blue)};
}

&:active {
color: ${props => props.theme.palette.black};
box-shadow: inset 0 -3px 0 0 ${props => props.theme.palette.blue};
box-shadow: inset 0 -3px 0 0 ${props => (props.color ? props.color : props.theme.palette.blue)};
}

${props =>
Expand All @@ -65,7 +65,7 @@ const StyledArcgisAccountControl = styled.div`
&,
&:hover {
color: ${props => props.theme.palette.black};
box-shadow: inset 0 -3px 0 0 ${props => props.theme.palette.blue};
box-shadow: inset 0 -3px 0 0 ${props => (props.color ? props.color : props.theme.palette.blue)};
}
`};
`;
Expand Down
6 changes: 5 additions & 1 deletion src/ArcgisAccount/ArcgisAccount.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ ArcgisAccount.propTypes = {
/** Callback when the user selects the Sign Out button. */
onRequestSignOut: PropTypes.func,
/** Append Popover to body. */
appendToBody: PropTypes.bool
appendToBody: PropTypes.bool,
/** Specify color of Popover buttons and active marker under avatar. */
color: PropTypes.string,
/** Specify hover color of Popover buttons and active marker under avatar. */
hoverColor: PropTypes.string
};

ArcgisAccount.defaultProps = {
Expand Down
2 changes: 2 additions & 0 deletions src/ArcgisAccount/doc/ArcgisAccount.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ import ArcgisAccount, {
portal={portal}
onRequestSwitchAccount={() => console.log('switch account clicked')}
onRequestSignOut={() => console.log('sign out clicked')}
color={'magenta'}
hoverColor={'yellow'}
>
<ArcgisAccountMenuItem
onClick={() => console.log('Profile & Settings clicked')}
Expand Down