@@ -23,7 +23,11 @@ import { createBlock, serialize } from '@wordpress/blocks'
2323export { default as StyleGuidePopover } from './popover'
2424
2525// TODO: This is not yet finished
26- const StyleGuide = ( ) => {
26+ const StyleGuide = props => {
27+ const { designSystem } = props
28+
29+ const { colors } = designSystem
30+
2731 const styleGuideRef = useRef ( null )
2832
2933 return (
@@ -35,41 +39,14 @@ const StyleGuide = () => {
3539 < h1 className = "ugb-style-guide__section-title" > { __ ( 'Colors' , i18n ) } </ h1 >
3640 < h2 className = "ugb-style-guide__section-subheading" > { __ ( 'Color Palette' , i18n ) } </ h2 >
3741 < div className = "ugb-style-guide__columns ugb-style-guide__colors" >
38- < div className = "ugb-style-guide__column" style = { { backgroundColor : '#f00069' } } >
39- < div className = "ugb-style-guide__color-label ugb-style-guide__label" style = { { color : isDarkColor ( '#f00069' ) ? '#fff' : '#000' } } >
40- #F00069
41- </ div >
42- </ div >
43- < div className = "ugb-style-guide__column" style = { { backgroundColor : '#111' } } >
44- < div className = "ugb-style-guide__color-label ugb-style-guide__label" style = { { color : isDarkColor ( '#111' ) ? '#fff' : '#000' } } >
45- #111111
46- </ div >
47- </ div >
48- < div className = "ugb-style-guide__column" style = { { backgroundColor : '#222' } } >
49- < div className = "ugb-style-guide__color-label ugb-style-guide__label" style = { { color : isDarkColor ( '#222' ) ? '#fff' : '#000' } } >
50- #222222
51- </ div >
52- </ div >
53- < div className = "ugb-style-guide__column" style = { { backgroundColor : '#333' } } >
54- < div className = "ugb-style-guide__color-label ugb-style-guide__label" style = { { color : isDarkColor ( '#333' ) ? '#fff' : '#000' } } >
55- #333333
42+ { colors . map ( ( color , key ) => {
43+ return < div key = { key } className = "ugb-style-guide__column" style = { { backgroundColor : color . color } } >
44+ < div className = "ugb-style-guide__color-label ugb-style-guide__label" style = { { color : isDarkColor ( color . color ) ? '#fff' : '#000' } } >
45+ < p > { color . name } </ p >
46+ < p > { color . color } </ p >
47+ </ div >
5648 </ div >
57- </ div >
58- < div className = "ugb-style-guide__column" style = { { backgroundColor : '#444' } } >
59- < div className = "ugb-style-guide__color-label ugb-style-guide__label" style = { { color : isDarkColor ( '#444' ) ? '#fff' : '#000' } } >
60- #444444
61- </ div >
62- </ div >
63- < div className = "ugb-style-guide__column" style = { { backgroundColor : '#555' } } >
64- < div className = "ugb-style-guide__color-label ugb-style-guide__label" style = { { color : isDarkColor ( '#555' ) ? '#fff' : '#000' } } >
65- #555555
66- </ div >
67- </ div >
68- < div className = "ugb-style-guide__column" style = { { backgroundColor : '#666' } } >
69- < div className = "ugb-style-guide__color-label ugb-style-guide__label" style = { { color : isDarkColor ( '#666' ) ? '#fff' : '#000' } } >
70- #666666
71- </ div >
72- </ div >
49+ } ) }
7350 </ div >
7451
7552 < h2 className = "ugb-style-guide__section-subheading" > { __ ( 'Color Schemes' , i18n ) } </ h2 >
0 commit comments