mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-20 12:37:01 +02:00
chore(v2): upgrade devDependencies (#2538)
* chore(v2): upgrade devDependencies * chore(v2): upgrade devDependencies * chore: prettier
This commit is contained in:
parent
ea8c916528
commit
b07507c9cc
148 changed files with 2385 additions and 1975 deletions
|
@ -65,11 +65,11 @@ function ColorGenerator({children, minHeight, url}) {
|
|||
const [shades, setShades] = useState(COLOR_SHADES);
|
||||
const color = Color('#' + baseColor);
|
||||
const adjustedColors = Object.keys(shades)
|
||||
.map(shade => ({
|
||||
.map((shade) => ({
|
||||
...shades[shade],
|
||||
variableName: shade,
|
||||
}))
|
||||
.map(value => ({
|
||||
.map((value) => ({
|
||||
...value,
|
||||
hex: color.darken(value.adjustment).hex(),
|
||||
}));
|
||||
|
@ -84,7 +84,7 @@ function ColorGenerator({children, minHeight, url}) {
|
|||
id="primary_color"
|
||||
className={styles.input}
|
||||
defaultValue={baseColor}
|
||||
onChange={event => {
|
||||
onChange={(event) => {
|
||||
const colorValue = event.target.value;
|
||||
try {
|
||||
Color('#' + colorValue);
|
||||
|
@ -107,7 +107,7 @@ function ColorGenerator({children, minHeight, url}) {
|
|||
<tbody>
|
||||
{adjustedColors
|
||||
.sort((a, b) => a.displayOrder - b.displayOrder)
|
||||
.map(value => {
|
||||
.map((value) => {
|
||||
const {variableName, adjustment, adjustmentInput, hex} = value;
|
||||
return (
|
||||
<tr key={variableName}>
|
||||
|
@ -134,7 +134,7 @@ function ColorGenerator({children, minHeight, url}) {
|
|||
className={styles.input}
|
||||
type="number"
|
||||
value={adjustmentInput}
|
||||
onChange={event => {
|
||||
onChange={(event) => {
|
||||
const newValue = parseFloat(event.target.value);
|
||||
setShades({
|
||||
...shades,
|
||||
|
@ -163,7 +163,7 @@ function ColorGenerator({children, minHeight, url}) {
|
|||
<CodeBlock className="css">
|
||||
{adjustedColors
|
||||
.sort((a, b) => a.codeOrder - b.codeOrder)
|
||||
.map(value => `${value.variableName}: ${value.hex.toLowerCase()};`)
|
||||
.map((value) => `${value.variableName}: ${value.hex.toLowerCase()};`)
|
||||
.join('\n')}
|
||||
</CodeBlock>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue