[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 a048ea9d3d2191663e987b2899a887277ad5af05
parent a742078f805a546ddb115937db6bd51dbddf18b7
Author: mcol <mcol@posteo.net>
Date:   Sat, 27 Jun 2020 13:47:25 +0100

remove helpers; move fixColour to colour component

Diffstat:
Msrc/components/button/index.js | 1-
Asrc/components/colour/helpers.js | 0
Msrc/components/colour/index.js | 9++++++++-
Dsrc/features/helpers.js | 6------
4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/components/button/index.js b/src/components/button/index.js @@ -1,7 +1,6 @@ import React from 'react'; import { useDispatch } from 'react-redux'; -import { fixColour } from 'features/helpers'; import './index.css'; diff --git a/src/components/colour/helpers.js b/src/components/colour/helpers.js diff --git a/src/components/colour/index.js b/src/components/colour/index.js @@ -3,10 +3,17 @@ import { useDispatch } from 'react-redux'; import ColorPicker from 'rc-color-picker'; import 'rc-color-picker/assets/index.css'; -import { fixColour } from 'features/helpers'; import './index.css'; +function fixColour(colour) { + if (colour[0] !== '#') { + colour = '#' + colour + } + return colour +} + + export default function Colour(props) { const dispatch = useDispatch(); diff --git a/src/features/helpers.js b/src/features/helpers.js @@ -1,6 +0,0 @@ -export function fixColour(colour) { - if (colour[0] !== '#') { - colour = '#' + colour - } - return colour -}