mirror of
https://github.com/plankanban/planka.git
synced 2025-08-03 20:45:27 +02:00
Background gradients, migrate from CSS to SCSS, remove !important
This commit is contained in:
parent
196121bd38
commit
ff95a12578
312 changed files with 4295 additions and 2989 deletions
|
@ -1,3 +1,5 @@
|
|||
import upperFirst from 'lodash/upperFirst';
|
||||
import camelCase from 'lodash/camelCase';
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
|
@ -7,7 +9,8 @@ import { Input } from '../../lib/custom-ui';
|
|||
|
||||
import LabelColors from '../../constants/LabelColors';
|
||||
|
||||
import styles from './Editor.module.css';
|
||||
import styles from './Editor.module.scss';
|
||||
import globalStyles from '../../styles.module.scss';
|
||||
|
||||
const Editor = React.memo(({ data, onFieldChange }) => {
|
||||
const [t] = useTranslation();
|
||||
|
@ -31,19 +34,17 @@ const Editor = React.memo(({ data, onFieldChange }) => {
|
|||
/>
|
||||
<div className={styles.text}>{t('common.color')}</div>
|
||||
<div className={styles.colorButtons}>
|
||||
{LabelColors.PAIRS.map(([name, hex]) => (
|
||||
{LabelColors.map((color) => (
|
||||
<Button
|
||||
key={name}
|
||||
key={color}
|
||||
type="button"
|
||||
name="color"
|
||||
value={name}
|
||||
value={color}
|
||||
className={classNames(
|
||||
styles.colorButton,
|
||||
name === data.color && styles.colorButtonActive,
|
||||
color === data.color && styles.colorButtonActive,
|
||||
globalStyles[`background${upperFirst(camelCase(color))}`],
|
||||
)}
|
||||
style={{
|
||||
background: hex,
|
||||
}}
|
||||
onClick={onFieldChange}
|
||||
/>
|
||||
))}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue