Skip to content

Commit

Permalink
added icon header
Browse files Browse the repository at this point in the history
  • Loading branch information
rogermyang committed Jun 29, 2018
1 parent 060e142 commit 0336721
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions daemon/web/components/IconHeader/IconHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const icons = {
settings: <i className="fas fa-cog" />,
};

const IconHeader = ({ title, type }) => (
<div className="iconheader">
const IconHeader = ({ title, type, style }) => (
<div className="iconheader" style={style}>
{icons[type]}
<h1 className="header">{title}</h1>
</div>
Expand All @@ -19,6 +19,7 @@ const IconHeader = ({ title, type }) => (
IconHeader.propTypes = {
title: PropTypes.string.isRequired,
type: PropTypes.string.isRequired,
style: PropTypes.object,
};

export default IconHeader;
4 changes: 3 additions & 1 deletion daemon/web/pages/settings/Settings.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from 'react';
import { connect } from 'react-redux';
import ShutdownButton from '../../components/ShutdownButton/ShutdownButton';
import IconHeader from '../../components/IconHeader/IconHeader';


import {
Table,
Expand All @@ -20,7 +22,7 @@ class SettingsWrapper extends React.Component {
return (

<div>
<h1 style={{ margin: '1rem' }}>PROJECT INFORMATION</h1>
<IconHeader type="settings" title="PROJECT INFORMATION" style={{ margin: '1rem' }} />
<Table style={{ width: '90%', margin: '1rem' }}>
<TableHeader>
<TableRow>
Expand Down

0 comments on commit 0336721

Please sign in to comment.