Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Commit

Permalink
fix(Subsection): fix subsection for safari 10
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaunius Eitmantis authored and jesperwiner committed Nov 8, 2018
1 parent 31f9711 commit 2be18e3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
6 changes: 4 additions & 2 deletions src/components/subsection/subsection-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ export default ({ palette, typography, mixins, transitions }) => ({
title: {
...typography.secondary,
fontSize: 20,
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
lineHeight: 1.4,
padding: [8, 0],
Expand All @@ -35,6 +33,10 @@ export default ({ palette, typography, mixins, transitions }) => ({
cursor: 'auto',
},
},
titleContent: {
display: 'flex',
justifyContent: 'space-between',
},
loading: {
cursor: 'auto',
},
Expand Down
28 changes: 15 additions & 13 deletions src/components/subsection/subsection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,21 @@ class Subsection extends React.Component {
)}
<div className={classes.mainSection}>
<button className={cn(classes.title, { [classes.loading]: loading })} onClick={this.handleToggle}>
<div className={classes.titleLeft}>
{CustomIcon && (
<div className={cn(classes.icon, classes.mobileOnly)}>
<CustomIcon />
</div>
)}
<Title />
</div>
<div className={classes.titleRight}>
{loading && <Spinner />}
{!loading && (
<div className={cn(classes.chevron, classes.mobileOnly)}>{toggled ? <Icon.ChevronUp /> : <Icon.ChevronDown />}</div>
)}
<div className={classes.titleContent}>
<div className={classes.titleLeft}>
{CustomIcon && (
<div className={cn(classes.icon, classes.mobileOnly)}>
<CustomIcon />
</div>
)}
<Title />
</div>
<div className={classes.titleRight}>
{loading && <Spinner />}
{!loading && (
<div className={cn(classes.chevron, classes.mobileOnly)}>{toggled ? <Icon.ChevronUp /> : <Icon.ChevronDown />}</div>
)}
</div>
</div>
</button>
<div
Expand Down

0 comments on commit 2be18e3

Please sign in to comment.