Consistent borders (#190)

* Use 1px border width

* Fix double border width on collapse element
main
Jake Dexheimer 7 years ago committed by GitHub
parent 71abf28466
commit d314b8643b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -81,9 +81,10 @@ class BackgroundSelect extends React.Component {
.bg-select-display { .bg-select-display {
display: flex; display: flex;
overflow: hidden;
height: 100%; height: 100%;
width: 72px; width: 72px;
border: 0.5px solid ${COLORS.SECONDARY}; border: 1px solid ${COLORS.SECONDARY};
border-radius: 3px; border-radius: 3px;
} }
@ -95,20 +96,17 @@ class BackgroundSelect extends React.Component {
cursor: default; cursor: default;
height: 100%; height: 100%;
padding: 0 8px; padding: 0 8px;
border-right: 0.5px solid ${COLORS.SECONDARY}; border-right: 1px solid ${COLORS.SECONDARY};
} }
.bg-color-container { .bg-color-container {
position: relative; position: relative;
width: 34px; width: 100%;
margin-bottom: 1px;
background: #fff; background: #fff;
border-radius: 0px 2px 2px 0px;
cursor: pointer; cursor: pointer;
} }
.bg-color { .bg-color {
border-radius: 0px 2px 2px 0px;
position: absolute; position: absolute;
top: 0px; top: 0px;
right: 0px; right: 0px;
@ -124,7 +122,6 @@ class BackgroundSelect extends React.Component {
} }
.bg-color-alpha { .bg-color-alpha {
border-radius: 0px 2px 2px 0px;
position: absolute; position: absolute;
top: 0px; top: 0px;
right: 0px; right: 0px;
@ -162,7 +159,7 @@ class BackgroundSelect extends React.Component {
width: 222px; width: 222px;
margin-left: 36px; margin-left: 36px;
margin-top: 4px; margin-top: 4px;
border: 0.5px solid ${COLORS.SECONDARY}; border: 1px solid ${COLORS.SECONDARY};
border-radius: 3px; border-radius: 3px;
background: #1a1a1a; background: #1a1a1a;
} }

@ -8,7 +8,7 @@ export default props => (
...props.style, ...props.style,
background: COLORS.BLACK, background: COLORS.BLACK,
color: props.color, color: props.color,
border: `0.5px solid ${props.color}` border: `1px solid ${props.color}`
}} }}
> >
<span>{props.title}</span> <span>{props.title}</span>

@ -20,7 +20,15 @@ class Collapse extends React.Component {
if (this.state.open) { if (this.state.open) {
return this.props.children return this.props.children
} }
return <Toggle enabled={false} center={true} label={this.props.label} onChange={this.toggle} /> return (
<Toggle
enabled={false}
center={true}
label={this.props.label}
className="collapse"
onChange={this.toggle}
/>
)
} }
} }

@ -41,7 +41,7 @@ class Dropdown extends React.Component {
background: ${COLORS.BLACK}; background: ${COLORS.BLACK};
user-select: none; user-select: none;
padding: 8px 16px; padding: 8px 16px;
border-bottom: 0.5px solid ${COLORS.SECONDARY}; border-bottom: 1px solid ${COLORS.SECONDARY};
} }
.dropdown-list-item:hover { .dropdown-list-item:hover {
@ -120,7 +120,7 @@ class Dropdown extends React.Component {
.dropdown-list { .dropdown-list {
display: none; display: none;
margin-top: -1px; margin-top: -1px;
border: 0.5px solid ${COLORS.SECONDARY}; border: 1px solid ${COLORS.SECONDARY};
border-radius: 0px 0px 3px 3px; border-radius: 0px 0px 3px 3px;
max-height: 350px; max-height: 350px;
overflow-y: scroll; overflow-y: scroll;

@ -33,11 +33,11 @@ export default class extends React.Component {
cursor: pointer; cursor: pointer;
user-select: none; user-select: none;
padding: 8px 16px; padding: 8px 16px;
border-bottom: 0.5px solid ${COLORS.SECONDARY}; border-bottom: 1px solid ${COLORS.SECONDARY};
background: rgba(255, 255, 255, 0.165); background: rgba(255, 255, 255, 0.165);
} }
.list-item:first-of-type { .list-item:first-of-type {
border-top: 0.5px solid ${COLORS.SECONDARY}; border-top: 1px solid ${COLORS.SECONDARY};
} }
.list-item:last-of-type { .list-item:last-of-type {
border-bottom: none; border-bottom: none;

@ -114,7 +114,7 @@ class Settings extends React.Component {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
border: 0.5px solid ${COLORS.SECONDARY}; border: 1px solid ${COLORS.SECONDARY};
border-radius: 3px; border-radius: 3px;
user-select: none; user-select: none;
position: relative; position: relative;
@ -135,7 +135,7 @@ class Settings extends React.Component {
position: absolute; position: absolute;
top: 44px; top: 44px;
left: 0; left: 0;
border: 0.5px solid ${COLORS.SECONDARY}; border: 1px solid ${COLORS.SECONDARY};
width: 184px; width: 184px;
border-radius: 3px; border-radius: 3px;
background: ${COLORS.BLACK}; background: ${COLORS.BLACK};
@ -145,7 +145,8 @@ class Settings extends React.Component {
border-bottom: solid 1px ${COLORS.SECONDARY}; border-bottom: solid 1px ${COLORS.SECONDARY};
} }
.settings-settings > :global(div):first-child { .settings-settings > :global(div):first-child,
.settings-settings > :global(.collapse) {
border-bottom: none; border-bottom: none;
} }
`}</style> `}</style>

@ -13,14 +13,14 @@ export default class extends React.Component {
render() { render() {
return ( return (
<div className="toggle" onClick={this.toggle}> <div className={'toggle ' + this.props.className} onClick={this.toggle}>
<span className="label">{this.props.label}</span> <span className="label">{this.props.label}</span>
{this.props.enabled ? <Checkmark /> : null} {this.props.enabled ? <Checkmark /> : null}
<style jsx>{` <style jsx>{`
.toggle { .toggle {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: ${this.props.center ? 'center' : 'space-between'} justify-content: ${this.props.center ? 'center' : 'space-between'};
cursor: pointer; cursor: pointer;
user-select: none; user-select: none;
padding: 8px; padding: 8px;

Loading…
Cancel
Save