This repository has been archived by the owner on Aug 30, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add header to SlidingPanel component (#137)
* Add header to SlidingPanel component * fix unit tests and update cov script command * adjust font for the close button icon
- Loading branch information
Yuri Drabik
authored and
Artem Riasnianskyi
committed
Aug 8, 2017
1 parent
cc53a02
commit ba490fc
Showing
11 changed files
with
277 additions
and
32 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
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,28 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
const SlidingPanelHeader = ({ title }) => { | ||
if (!title) { | ||
return <noscript />; | ||
} | ||
|
||
return ( | ||
<div className="ui-sliding-panel-header"> | ||
<h3 className="ui-sliding-panel-header__title"> | ||
{title} | ||
</h3> | ||
<button | ||
className="ui-sliding-panel-header__close-button" | ||
rel="close" | ||
> | ||
× | ||
</button> | ||
</div> | ||
); | ||
}; | ||
|
||
SlidingPanelHeader.propTypes = { | ||
title: PropTypes.string.isRequired, | ||
}; | ||
|
||
export default SlidingPanelHeader; |
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,38 @@ | ||
.ui-sliding-panel-header { | ||
background-color: var(--tx-generic-color-blank); | ||
border-bottom: solid 2px var(--tx-generic-color-secondary-darker); | ||
flex-shrink: 0; | ||
height: 65px; | ||
min-height: 65px; | ||
text-align: center; | ||
} | ||
|
||
.ui-sliding-panel-header__title { | ||
line-height: 65px; | ||
margin: 0; | ||
padding: 0 50px; | ||
} | ||
|
||
.ui-sliding-panel-header__close-button { | ||
background: none; | ||
border: none; | ||
box-shadow: none; | ||
color: var(--tx-generic-color-secondary-darker); | ||
cursor: pointer; | ||
font-family: Arial, sans-serif; | ||
font-size: 40px; | ||
font-weight: 400; | ||
height: 25px; | ||
line-height: 25px; | ||
overflow: visible; | ||
padding: 0; | ||
position: absolute; | ||
right: var(--tx-sliding-panel-panel-padding); | ||
text-align: right; | ||
top: 20px; | ||
width: 20px; | ||
|
||
&:hover { | ||
color: var(--tx-generic-color-secondary-darkest); | ||
} | ||
} |
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
Oops, something went wrong.