[Work in progress] A Reactjs-based web app to help with ricing: designing beautiful unix desktop environments.
git clone https://mcol.xyz/code/unix.sexy
Log | Files | Refs

commit b9c1e506cb0817d1412e0562406fbf47d03fe1ae
parent a9d6792689795ea86993d48ccfc33e7bdc93a3e7
Author: mcol <mcol@posteo.net>
Date:   Thu,  9 Jul 2020 16:49:47 +0100

windowContentStyle should include padding; but tabs shouldnt use

Diffstat:
Msrc/components/tabs/index.js | 4++--
Msrc/features/window_content/index.js | 1-
Msrc/features/window_content/slice.js | 3++-
3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/components/tabs/index.js b/src/components/tabs/index.js @@ -35,7 +35,7 @@ function TabList(props) { {props.children.map((child, i) => { const { label } = child.props; - let className = 'tab-list-item tab-list-' + label; + let className = 'tab-list-item'; if (props.active === i) { className += ' tab-list-active'; } @@ -44,7 +44,7 @@ function TabList(props) { <li className={className} onClick={() => dispatch(setTab(i))} - style={style} + style={{backgroundColor: style.backgroundColor, color: style.color}} key={label} > {label === "About" ? <div className="square" style={{backgroundColor: style.color}}/> : label} diff --git a/src/features/window_content/index.js b/src/features/window_content/index.js @@ -12,7 +12,6 @@ export default function WindowContent(props) { const titleBars = useSelector(selectTitleBars); const style = { - padding: `${windowContent.padding}px`, width: "100%", height: "100%", boxSizing: "border-box", diff --git a/src/features/window_content/slice.js b/src/features/window_content/slice.js @@ -46,10 +46,11 @@ export const { export const selectWindowContent = state => state.windowContent; export const selectWindowContentCSS = state => { - const { colour, textColour } = state.windowContent; + const { colour, textColour, padding } = state.windowContent; return { backgroundColor: colour, color: textColour, + padding: `${padding}px`, } }