mirror of https://github.com/sgoudham/carbon.git
Merge pull request #3 from dawnlabs/window-themes
- Window themes - Better defaults - Editor styling consistencymain
commit
d6d65df044
@ -0,0 +1,18 @@
|
||||
import React from 'react'
|
||||
import { Controls, ControlsBW } from './svg/Controls'
|
||||
|
||||
export default ({ theme }) => (
|
||||
<div className="window-controls">
|
||||
{ theme === 'bw' ? <ControlsBW /> : <Controls /> }
|
||||
<style jsx>{`
|
||||
div {
|
||||
margin-top: -19px;
|
||||
position: relative;
|
||||
top: +30px;
|
||||
margin-left: 18px;
|
||||
z-index: 1;
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
</div>
|
||||
)
|
@ -0,0 +1,19 @@
|
||||
import React from 'react'
|
||||
|
||||
export default ({ fromLeft }) => (
|
||||
<div style={{ left: fromLeft }}>
|
||||
<div className="window-pointer" />
|
||||
<style jsx>{`
|
||||
.window-pointer {
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
border-style: solid;
|
||||
border-width: 0 4px 5px 4px;
|
||||
border-color: transparent transparent #fff transparent;
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
left: 15px;
|
||||
}
|
||||
`}</style>
|
||||
</div>
|
||||
)
|
@ -1,23 +1,21 @@
|
||||
import React from 'react'
|
||||
|
||||
export default () => (
|
||||
<div className="window-controls">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14">
|
||||
<g fill="none" fillRule="evenodd" transform="translate(1 1)">
|
||||
<circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" strokeWidth=".5"/>
|
||||
<circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" strokeWidth=".5"/>
|
||||
<circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" strokeWidth=".5"/>
|
||||
</g>
|
||||
</svg>
|
||||
<style jsx>{`
|
||||
div {
|
||||
margin-top: -19px;
|
||||
position: relative;
|
||||
top: +30px;
|
||||
margin-left: 18px;
|
||||
z-index: 1;
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
</div>
|
||||
export const Controls = () => (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14">
|
||||
<g fill="none" fillRule="evenodd" transform="translate(1 1)">
|
||||
<circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" strokeWidth=".5"/>
|
||||
<circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" strokeWidth=".5"/>
|
||||
<circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" strokeWidth=".5"/>
|
||||
</g>
|
||||
</svg>
|
||||
)
|
||||
|
||||
export const ControlsBW = () => (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="54" height="16" viewBox="0 0 54 14">
|
||||
<g fill="none" fillRule="evenodd" stroke="#878787" transform="translate(1 1)">
|
||||
<circle cx="6" cy="6" r="6"/>
|
||||
<circle cx="26" cy="6" r="6"/>
|
||||
<circle cx="46" cy="6" r="6"/>
|
||||
</g>
|
||||
</svg>
|
||||
)
|
||||
|
Loading…
Reference in New Issue