This repository has been archived by the owner on Aug 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changing naming to be more consistent
- Loading branch information
Showing
16 changed files
with
216 additions
and
203 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom' | ||
import Flexbox from 'flexbox-react' | ||
import ThinCardTitle from './ThinCardTitle' | ||
import ThinCardPrimaryAction from './ThinCardPrimaryAction' | ||
import ThinCardActionButton from './ThinCardActionButton' | ||
import ThinCardWidget from './ThinCardWidget' | ||
import ThinCardDrawer from './ThinCardDrawer'; | ||
import '../../styles/components/thin-card.css' | ||
|
||
|
||
class ThinCard extends React.Component { | ||
constructor(props) { | ||
super(props) | ||
|
||
} | ||
|
||
static Title = ThinCardTitle | ||
static PrimaryAction = ThinCardPrimaryAction | ||
static ActionButon = ThinCardActionButton | ||
static Widget = ThinCardWidget | ||
static Drawer = ThinCardDrawer | ||
|
||
render() { | ||
let borderClass = ''; | ||
if (this.props.noBorder){ | ||
borderClass = 'thincard__noborder'; | ||
} | ||
if (this.props.folder){ | ||
borderClass += ' thincard__folderpad' | ||
} | ||
return ( | ||
<Flexbox flexDirection="column" className={`thincard__row ${borderClass}`} key={this.props.data.id}> | ||
|
||
{(this.props.folder) ? ( | ||
<div className="topedge"></div> | ||
) : '' | ||
} | ||
<Flexbox flexDirection="row" flexGrow={3} className="primary-content"> | ||
{this.props.children} | ||
</Flexbox> | ||
{this.props.drawer} | ||
</Flexbox> | ||
) | ||
} | ||
} | ||
ThinCard.defaultProps = { | ||
folder: true, | ||
noBorder: false | ||
} | ||
ThinCard.propTypes = { | ||
folder: React.PropTypes.bool, | ||
noBorder: React.PropTypes.bool, | ||
} | ||
export default ThinCard |
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,25 @@ | ||
import React from 'react' | ||
import Flexbox from 'flexbox-react' | ||
|
||
const ThinCardActionButton = (props) => { | ||
return ( | ||
<Flexbox alignItems='center' flexGrow={3}> | ||
<div onClick={props.onClick} className={`thincard__action_button ${props.ClassName}`} style={props.style}> | ||
{props.children} | ||
</div> | ||
</Flexbox> | ||
) | ||
} | ||
|
||
ThinCardActionButton.defaultProps = { | ||
style: {}, | ||
className: {} | ||
} | ||
|
||
ThinCardActionButton.propTypes = { | ||
style: React.PropTypes.object, | ||
className: React.PropTypes.object, | ||
onClick: React.PropTypes.func | ||
} | ||
|
||
export default ThinCardActionButton |
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,22 @@ | ||
import React from 'react' | ||
import Flexbox from 'flexbox-react' | ||
|
||
const ThinCardPrimaryAction = (props) => { | ||
return ( | ||
<Flexbox alignItems='center' className={`thincard__primary_action ${props.className}`} style={props.style}> | ||
{props.children} | ||
</Flexbox> | ||
) | ||
} | ||
|
||
ThinCardPrimaryAction.defaultProps = { | ||
style: {}, | ||
className: {} | ||
} | ||
|
||
ThinCardPrimaryAction.propTypes = { | ||
style: React.PropTypes.object, | ||
className: React.PropTypes.object | ||
} | ||
|
||
export default ThinCardPrimaryAction |
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,22 @@ | ||
import React from 'react' | ||
import Flexbox from 'flexbox-react' | ||
|
||
const ThinCardTitle = (props) => { | ||
return ( | ||
<Flexbox alignItems='center' className={`thincard__title ${props.className}`} style={props.style}> | ||
{props.children} | ||
</Flexbox> | ||
) | ||
} | ||
|
||
ThinCardTitle.defaultProps = { | ||
style: {}, | ||
className: {} | ||
} | ||
|
||
ThinCardTitle.propTypes = { | ||
style: React.PropTypes.object, | ||
className: React.PropTypes.object | ||
} | ||
|
||
export default ThinCardTitle |
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,22 @@ | ||
import React from 'react' | ||
import Flexbox from 'flexbox-react' | ||
|
||
const ThinCardWidgetLabel = (props) => { | ||
return ( | ||
<Flexbox alignItems='center' className={` ${props.className} thincard__widget_label`} style={props.style}> | ||
{props.children} | ||
</Flexbox> | ||
) | ||
} | ||
|
||
ThinCardWidgetLabel.defaultProps = { | ||
style: {}, | ||
className: {} | ||
} | ||
|
||
ThinCardWidgetLabel.propTypes = { | ||
style: React.PropTypes.object, | ||
className: React.PropTypes.object | ||
} | ||
|
||
export default ThinCardWidgetLabel |
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 @@ | ||
import React from 'react' | ||
import Flexbox from 'flexbox-react' | ||
|
||
const ThinCardWidgetValue = (props) => { | ||
return ( | ||
<Flexbox alignItems='center' className={` ${props.className} thincard__widget_value`} style={props.style}> | ||
{props.children} | ||
</Flexbox> | ||
) | ||
} | ||
ThinCardWidgetValue.defaultProps = { | ||
style: {}, | ||
className: {} | ||
} | ||
|
||
ThinCardWidgetValue.propTypes = { | ||
style: React.PropTypes.object, | ||
className: React.PropTypes.object | ||
} | ||
export default ThinCardWidgetValue |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.