-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
STCOM-454: <PaneHeaderIconButton> (#866)
* Added PaneHeaderIconButton component * Replaced IconButton with PaneHeaderIconButton in components/examples * Added readme for PaneHeaderIconButton component * Added storybook example for PaneHeaderIconButton * Updated PaneHeaderIconButton example, fixed linting errors and added export in lib/index.js * Added an 'innerClassName'-prop for IconButton which enables styling of the inner element. This is needed in the <PaneHeaderIconButton>-component * Updated PaneHeaderIconButton example and added some classes to the component * Replaced <IconButton> with <PaneHeaderIconButton> in <PaneHeader> * Updated styles for PaneHeaderIconButton * Updated PaneHeader to make sure that there's always a PaneMenu present – even if none is passed. Also made sure that the button areas always has a class name * Now passing ref using forwardRef and made some css targeted PaneHeaderIconButton's inside of <PaneMenu>'s to ensure correct positioning without changing the horizontal padding of the <PaneHeader> * Fixed linting errors * Fixed some css selection specificity by moving adjustment styles into PaneHeader.css instead. Removed min-width and replace it with some horizontal padding instead to save space * Updated some readme's to reference PaneHeaderIconButton instead of IconButton * Minor fix for the PaneCloseLink-component that renders two PaneHeaderIconButton's which messes with the negative margin when targeting :first-child. * Made sure that button areas inside paneHeader's are always on top by setting a z-index. Also fixed some logic within PaneHeader by setting up refs with createRef() * Minor style update * Minor change to make sonarcloud succeed
- Loading branch information
1 parent
882c23c
commit 033f02b
Showing
19 changed files
with
204 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
.appIcon { | ||
display: inline-flex; | ||
align-items: center; | ||
flex-shrink: 0; | ||
} | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* PaneHeaderIconButton | ||
*/ | ||
|
||
@import "../variables"; | ||
|
||
.PaneHeaderIconButton { | ||
/* min-width: var(--control-min-size-touch); */ | ||
padding: 0 var(--gutter-static-one-third); | ||
min-height: var(--control-min-size-touch); | ||
} | ||
|
||
.PaneHeaderIconButton__inner { | ||
padding: 0; | ||
min-width: var(--control-min-size-desktop); | ||
min-height: var(--control-min-size-desktop); | ||
justify-content: center; | ||
align-items: center; | ||
composes: boxOffsetSmall from "../sharedStyles/interactionStyles.css"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* PaneHeaderIconButton | ||
*/ | ||
|
||
import React from 'react'; | ||
import classnames from 'classnames'; | ||
import IconButton from '../IconButton'; | ||
import css from './PaneHeaderIconButton.css'; | ||
import paneHeaderCss from '../PaneHeader/PaneHeader.css'; | ||
|
||
const PaneHeaderIconButton = React.forwardRef(({ className, innerClassName, ...rest }, ref) => ( | ||
<IconButton | ||
ref={ref} | ||
className={classnames(className, css.PaneHeaderIconButton, paneHeaderCss.paneHeaderIconButton)} | ||
innerClassName={classnames(css.PaneHeaderIconButton__inner, innerClassName)} | ||
{...rest} | ||
/> | ||
)); | ||
|
||
export default PaneHeaderIconButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './PaneHeaderIconButton'; |
Oops, something went wrong.