@ -2,7 +2,7 @@ import React from 'react'
import { useCopyTextHandler } from 'actionsack'
import { useCopyTextHandler } from 'actionsack'
import { COLORS } from '../lib/constants'
import { COLORS } from '../lib/constants'
import { Controls , ControlsBW } from './svg/Controls'
import { Controls , ControlsBW , ControlsBoxy } from './svg/Controls'
import CopySVG from './svg/Copy'
import CopySVG from './svg/Copy'
import CheckMark from './svg/Checkmark'
import CheckMark from './svg/Checkmark'
@ -36,9 +36,10 @@ const CopyButton = React.memo(function CopyButton({ text }) {
)
)
} )
} )
const WINDOW _THEMES _MAP = { bw : < ControlsBW / > , boxy : < ControlsBoxy / > }
export default ( { theme , copyable , code , light } ) => (
export default ( { theme , copyable , code , light } ) => (
< div className = "window-controls" >
< div className = "window-controls" >
{ theme === 'bw' ? < ControlsBW / > : < Controls / > }
{ WINDOW_THEMES _MAP [ theme ] || < Controls / > }
< div className = "window-title-container" >
< div className = "window-title-container" >
< input aria - label = "Image Title" type = "text" spellCheck = "false" / >
< input aria - label = "Image Title" type = "text" spellCheck = "false" / >
< / d i v >
< / d i v >
@ -54,7 +55,9 @@ export default ({ theme, copyable, code, light }) => (
position : relative ;
position : relative ;
top : $ { theme === 'bw' ? 36 : 34 } px ;
top : $ { theme === 'bw' ? 36 : 34 } px ;
margin - left : $ { theme === 'bw' ? 16 : 14 } px ;
margin - left : $ { theme === 'bw' ? 16 : 14 } px ;
margin - right : $ { theme === 'boxy' ? 8 : 0 } px ;
z - index : 2 ;
z - index : 2 ;
text - align : $ { theme === 'boxy' ? 'right' : 'initial' } ;
}
}
. window - title - container {
. window - title - container {