@@ -516,7 +516,14 @@ const PreviewBorderBox = styled("div")(({ theme , tokenName }) => {
516
516
} ;
517
517
} ) ;
518
518
519
-
519
+ const StyledTableRow = styled ( TableRow ) ( ( { theme } ) => ( {
520
+ "&:nth-child(odd)" : {
521
+ backgroundColor : theme . palette . background . default ,
522
+ } ,
523
+ "&:nth-child(even)" : {
524
+ backgroundColor : theme . palette . background . secondary ,
525
+ } ,
526
+ } ) ) ;
520
527
521
528
522
529
const StyledTableContainer = styled ( TableContainer ) ( ( ) => ( {
@@ -620,10 +627,7 @@ const ColorCode = () => {
620
627
</ TableHead >
621
628
< TableBody >
622
629
{ brandColors . map ( ( col ) => (
623
- < TableRow
624
- key = { col . tokenName }
625
-
626
- >
630
+ < StyledTableRow key = { col . tokenName } >
627
631
< StyledTableCell > { col . tokenName } </ StyledTableCell >
628
632
< StyledTableCell > { col . name } </ StyledTableCell >
629
633
< StyledTableCell > < CopyColor hex = { col . hex } /> </ StyledTableCell >
@@ -633,7 +637,7 @@ const ColorCode = () => {
633
637
< StyledTableCell align = "center" >
634
638
< PreviewBox bgcolor = { col . hex } />
635
639
</ StyledTableCell >
636
- </ TableRow >
640
+ </ StyledTableRow >
637
641
) ) }
638
642
</ TableBody >
639
643
</ Table >
@@ -660,10 +664,7 @@ const ColorCode = () => {
660
664
</ TableHead >
661
665
< TableBody >
662
666
{ greyscaleColors . map ( ( col ) => (
663
- < TableRow
664
- key = { col . tokenName }
665
-
666
- >
667
+ < StyledTableRow key = { col . tokenName } >
667
668
< StyledTableCell > { col . tokenName } </ StyledTableCell >
668
669
< StyledTableCell > { col . name } </ StyledTableCell >
669
670
< StyledTableCell > < CopyColor hex = { col . hex } /> </ StyledTableCell >
@@ -673,7 +674,7 @@ const ColorCode = () => {
673
674
< StyledTableCell align = "center" >
674
675
< PreviewBox bgcolor = { col . hex } />
675
676
</ StyledTableCell >
676
- </ TableRow >
677
+ </ StyledTableRow >
677
678
) ) }
678
679
</ TableBody >
679
680
</ Table >
@@ -701,10 +702,7 @@ const ColorCode = () => {
701
702
</ TableHead >
702
703
< TableBody >
703
704
{ functionColors . map ( ( col ) => (
704
- < TableRow
705
- key = { col . tokenName }
706
-
707
- >
705
+ < StyledTableRow key = { col . tokenName } >
708
706
< StyledTableCell > { col . tokenName } </ StyledTableCell >
709
707
< StyledTableCell > { col . name } </ StyledTableCell >
710
708
< StyledTableCell > < CopyColor hex = { col . hex } /> </ StyledTableCell >
@@ -714,7 +712,7 @@ const ColorCode = () => {
714
712
< StyledTableCell align = "center" >
715
713
< PreviewBox bgcolor = { col . hex } />
716
714
</ StyledTableCell >
717
- </ TableRow >
715
+ </ StyledTableRow >
718
716
) ) }
719
717
</ TableBody >
720
718
</ Table >
@@ -751,10 +749,7 @@ const ColorCode = () => {
751
749
</ TableHead >
752
750
< TableBody >
753
751
{ backgroundColors . map ( ( col ) => (
754
- < TableRow
755
- key = { col . tokenName }
756
-
757
- >
752
+ < StyledTableRow key = { col . tokenName } >
758
753
< StyledTableCell > { col . tokenName } </ StyledTableCell >
759
754
< StyledTableCell > { col . Alias_of } </ StyledTableCell >
760
755
< StyledTableCell > < CopyColor hex = { col . hex } /> </ StyledTableCell >
@@ -767,7 +762,7 @@ const ColorCode = () => {
767
762
< StyledTableCell >
768
763
{ col . role }
769
764
</ StyledTableCell >
770
- </ TableRow >
765
+ </ StyledTableRow >
771
766
) ) }
772
767
</ TableBody >
773
768
</ Table >
@@ -794,10 +789,7 @@ const ColorCode = () => {
794
789
</ TableHead >
795
790
< TableBody >
796
791
{ textColors . map ( ( col ) => (
797
- < TableRow
798
- key = { col . tokenName }
799
-
800
- >
792
+ < StyledTableRow key = { col . tokenName } >
801
793
< StyledTableCell > { col . tokenName } </ StyledTableCell >
802
794
< StyledTableCell > { col . Alias_of } </ StyledTableCell >
803
795
< StyledTableCell > < CopyColor hex = { col . hex } /> </ StyledTableCell >
@@ -810,7 +802,7 @@ const ColorCode = () => {
810
802
< StyledTableCell >
811
803
{ col . role }
812
804
</ StyledTableCell >
813
- </ TableRow >
805
+ </ StyledTableRow >
814
806
) ) }
815
807
</ TableBody >
816
808
</ Table >
@@ -837,10 +829,7 @@ const ColorCode = () => {
837
829
</ TableHead >
838
830
< TableBody >
839
831
{ borderColors . map ( ( col ) => (
840
- < TableRow
841
- key = { col . tokenName }
842
-
843
- >
832
+ < StyledTableRow key = { col . tokenName } >
844
833
< StyledTableCell > { col . tokenName } </ StyledTableCell >
845
834
< StyledTableCell > { col . Alias_of } </ StyledTableCell >
846
835
< StyledTableCell > < CopyColor hex = { col . hex } /> </ StyledTableCell >
@@ -853,7 +842,7 @@ const ColorCode = () => {
853
842
< StyledTableCell >
854
843
{ col . role }
855
844
</ StyledTableCell >
856
- </ TableRow >
845
+ </ StyledTableRow >
857
846
) ) }
858
847
</ TableBody >
859
848
</ Table >
@@ -885,10 +874,7 @@ const ColorCode = () => {
885
874
</ TableHead >
886
875
< TableBody >
887
876
{ componentColors . map ( ( col ) => (
888
- < TableRow
889
- key = { col . tokenName }
890
-
891
- >
877
+ < StyledTableRow key = { col . tokenName } >
892
878
< StyledTableCell > { col . tokenName } </ StyledTableCell >
893
879
< StyledTableCell > { col . Alias_of } </ StyledTableCell >
894
880
< StyledTableCell > < CopyColor hex = { col . hex } /> </ StyledTableCell >
@@ -901,7 +887,7 @@ const ColorCode = () => {
901
887
< StyledTableCell >
902
888
{ col . role }
903
889
</ StyledTableCell >
904
- </ TableRow >
890
+ </ StyledTableRow >
905
891
) ) }
906
892
</ TableBody >
907
893
</ Table >
0 commit comments