Skip to content

Commit

Permalink
Style cleanup (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
George Karagkiaouris authored and sindresorhus committed Sep 24, 2018
1 parent fe0b2d6 commit 6891b58
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 5 deletions.
2 changes: 1 addition & 1 deletion renderer/components/action-bar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ActionBar extends React.Component {
width: ${width}px;
background: white;
border-radius: 4px;
box-shadow: 0px 0px 5px 2px rgba(0, 0, 0, 0.2);
box-shadow: 0 20px 40px 0 rgba(0, 0, 0, .2);
z-index: 10;
top: ${y}px;
left: ${x}px;
Expand Down
1 change: 1 addition & 0 deletions renderer/components/editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export default class Editor extends React.Component {
display: flex;
align-items: center;
justify-content: center;
font-size: 1.4rem;
color: #fff;
}
Expand Down
3 changes: 3 additions & 0 deletions renderer/components/preferences/categories/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class Settings extends React.Component {
return (
<Category>
<Item
parentItem
title="Show cursor"
subtitle="Display the mouse cursor in your Kaptures"
>
Expand All @@ -81,6 +82,7 @@ class Settings extends React.Component {
/>
</Item>
<Item
parentItem
title="Keyboard shortcuts"
subtitle="Toggle and customise keyboard shortcuts"
>
Expand Down Expand Up @@ -110,6 +112,7 @@ class Settings extends React.Component {
<Switch checked={loopExports} onClick={() => toggleSetting('loopExports')}/>
</Item>
<Item
parentItem
title="Audio recording"
subtitle="Record audio from input device"
>
Expand Down
17 changes: 14 additions & 3 deletions renderer/components/preferences/item/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,18 @@ class Item extends React.Component {
onSubtitleClick,
warning,
onClick,
last
last,
parentItem
} = this.props;

const subtitleArray = Array.isArray(subtitle) ? subtitle : [subtitle];

const className = classNames('title', {experimental});
const containerClassName = classNames('container', {parent: parentItem});
const subtitleClassName = classNames('subtitle', {link: Boolean(onSubtitleClick)});

return (
<div className="container" onClick={onClick}>
<div className={containerClassName} onClick={onClick}>
<div className="item" id={id}>
{warning}
<div className="content">
Expand All @@ -81,6 +83,13 @@ class Item extends React.Component {
flex-direction: column;
}
.parent {
padding-left: 0;
padding-right: 0;
margin-left: 16px;
margin-right: 16px;
}
.item {
display: flex;
flex-direction: ${vertical ? 'column' : 'row'};
Expand All @@ -101,6 +110,7 @@ class Item extends React.Component {
.subtitle {
color: ${onClick ? '#007aff' : '#606060'};
font-weight: ${onClick ? '500' : 'normal'};
font-size: 1.2rem;
}
Expand Down Expand Up @@ -171,7 +181,8 @@ Item.propTypes = {
PropTypes.node
]),
onClick: PropTypes.func,
last: PropTypes.bool
last: PropTypes.bool,
parentItem: PropTypes.bool
};

export default Item;
4 changes: 4 additions & 0 deletions renderer/pages/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ export default class EditorPage extends React.Component {
</Provider>
</div>
<style jsx global>{`
html {
font-size: 62.5%;
}
body,
.cover-window {
margin: 0;
Expand Down
2 changes: 1 addition & 1 deletion renderer/pages/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default class PreferencesPage extends React.Component {
}
.overlay.active {
background-color: rgba(0,0,0,0.5);
background-color: rgba(0,0,0,0.2);
}
Expand Down

0 comments on commit 6891b58

Please sign in to comment.