Browse Source

uniq (#21522)

pull/21547/head
Amumu 5 years ago
committed by GitHub
parent
commit
bb335bcc78
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      site/theme/template/Color/ColorPatterns.jsx

3
site/theme/template/Color/ColorPatterns.jsx

@ -1,9 +1,10 @@
import React from 'react';
import uniq from 'lodash/uniq';
import { generate } from '@ant-design/colors';
import ColorBlock from './ColorBlock';
export default function ColorPatterns({ color }) {
return generate(color).map((colorString, i) => (
return uniq(generate(color)).map((colorString, i) => (
<ColorBlock color={colorString} index={i + 1} key={colorString} />
));
}

Loading…
Cancel
Save