Skip to content

Commit

Permalink
Removed separate B12 icon from SidebarHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
zhadaev committed Oct 14, 2024
1 parent 984d2a0 commit c06802e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 39 deletions.
32 changes: 6 additions & 26 deletions components/layout/sidebar/header/SidebarHeader.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import QuickActions from './QuickActions.es6.js'
import SidebarBackButton from './SidebarBackButton.es6.js'
import SidebarHeaderActionButton from './SidebarHeaderActionButton.es6.js'
import Button from '../../../form/button/Button.es6.js'
import { Home, B12Logo } from '../../../Icons.es6.js'
import { B12Logo } from '../../../Icons.es6.js'

class SidebarHeader extends React.Component {
state = {
Expand Down Expand Up @@ -74,15 +74,13 @@ class SidebarHeader extends React.Component {
quickDialog,
showLogo,
steps,
title,
b12Button,
onB12Click
title
} = this.props
const { actionsAvailable, actionsVisible } = this.state

return (
<Fragment>
<div className={classnames('ds-sidebar__header', { 'ds-sidebar__header--b12-home-icon': b12Button })}>
<div className="ds-sidebar__header">
<div className="ds-sidebar__header-back">
{showLogo && <B12Logo color="#6548c7" width={46} height={20} viewBox="0 0 200 80" className="ds-sidebar__header-logo" />}

Expand All @@ -97,28 +95,14 @@ class SidebarHeader extends React.Component {
{!showLogo && !backButton && leftAction}

{homeButton && (
<React.Fragment>
<div className="ds-sidebar__header-divider" />
{!isScrollingDown && (
<Button
small
className="ds-sidebar__header-home"
icon={<Home />}
onClick={onHomeClick}
/>
)}
</React.Fragment>
)}

{b12Button && (
<React.Fragment>
<div className="ds-sidebar__header-divider" />
{!isScrollingDown && (
<Button
small
className="ds-sidebar__header-home"
icon={<B12Logo width={30} height={20} color="#84839c" viewBox="0 0 200 80" />}
onClick={onB12Click}
onClick={onHomeClick}
/>
)}
</React.Fragment>
Expand Down Expand Up @@ -193,9 +177,7 @@ SidebarHeader.defaultProps = {
quickActions: [],
showLogo: false,
quickDialog: null,
tabbedNavigation: null,
b12Button: false,
onB12Click: () => {}
tabbedNavigation: null
}

SidebarHeader.propTypes = {
Expand All @@ -220,9 +202,7 @@ SidebarHeader.propTypes = {
onQuickActionSelected: PropTypes.func,
showLogo: PropTypes.bool,
quickDialog: PropTypes.element,
tabbedNavigation: PropTypes.element,
b12Button: PropTypes.bool,
onB12Click: PropTypes.func
tabbedNavigation: PropTypes.element
}

export default SidebarHeader
16 changes: 3 additions & 13 deletions style/layout/side-pane.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,6 @@
box-shadow: none;
}

&--b12-home-icon {
.ds-sidebar__header-divider {
margin: 0 8px;
}

.ds-sidebar__header-home {
margin-left: 0;
padding: 0 !important;
}
}

&-title {
font-family: $ds-font-family-base;
font-size: 20px;
Expand Down Expand Up @@ -118,14 +107,15 @@
width: 1px;
height: 16px;
background: #eee;
margin: 0 spacing(xxsm);
margin: 0 8px;
}

&-home {
border: 0 none !important;
box-shadow: none !important;
background: $ds-ui-lightest-color;
margin-left: -11px;
margin-left: 0;
padding: 0 !important;

&:hover,
&:focus,
Expand Down

0 comments on commit c06802e

Please sign in to comment.