diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-10-20 17:01:37 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-11 18:14:41 +0100 |
| commit | 9492414d4ae94045eff4e06f636529bc0e71cb06 (patch) | |
| tree | 7f268e6b62ee89128abd0581301265dc64f147d5 /src/components/atoms | |
| parent | c6f6f8f895e68f2d85ca681997ef613d982bac14 (diff) | |
refactor(components): rewrite Copyright component
* remove `icon` prop (it is confusing because a copyright should have
the copyright symbol, the license is not part of the copyright)
* reorganize copyright informations
I also updated the CC BY SA icon because the elements was in the wrong
order.
Diffstat (limited to 'src/components/atoms')
| -rw-r--r-- | src/components/atoms/images/icons/svg-paths/icons-paths/cc-by-sa-icon-paths.tsx | 19 | ||||
| -rw-r--r-- | src/components/atoms/layout/copyright.module.scss | 32 | ||||
| -rw-r--r-- | src/components/atoms/layout/copyright.stories.tsx | 58 | ||||
| -rw-r--r-- | src/components/atoms/layout/copyright.test.tsx | 34 | ||||
| -rw-r--r-- | src/components/atoms/layout/copyright.tsx | 50 | ||||
| -rw-r--r-- | src/components/atoms/layout/index.ts | 1 |
6 files changed, 11 insertions, 183 deletions
diff --git a/src/components/atoms/images/icons/svg-paths/icons-paths/cc-by-sa-icon-paths.tsx b/src/components/atoms/images/icons/svg-paths/icons-paths/cc-by-sa-icon-paths.tsx index 5961d92..a21b94d 100644 --- a/src/components/atoms/images/icons/svg-paths/icons-paths/cc-by-sa-icon-paths.tsx +++ b/src/components/atoms/images/icons/svg-paths/icons-paths/cc-by-sa-icon-paths.tsx @@ -8,13 +8,16 @@ import type { FC } from 'react'; */ export const CCBySAIconPaths: FC = () => ( <> - <path d="m 82.802205,12.372338 c 0,-1.418881 0.700478,-2.129264 2.102849,-2.129264 1.402371,0 2.102377,0.70944 2.102377,2.129264 0,1.401427 -0.700949,2.102377 -2.102377,2.102377 -1.401427,0 -2.102849,-0.70095 -2.102849,-2.102377 z" /> - <path d="m 88.975373,16.253505 v 6.172224 H 87.25083 v 7.331198 h -4.690608 v -7.330726 h -1.724544 v -6.172696 c 0,-0.269814 0.09434,-0.49859 0.28255,-0.687271 0.189153,-0.188209 0.4184,-0.283021 0.68727,-0.283021 h 6.200055 c 0.251418,0 0.47642,0.09434 0.673591,0.283021 0.1967,0.188681 0.296229,0.417929 0.296229,0.687271 z" /> - <path d="m 84.878809,4.905526 c -4.169377,0 -7.708404,1.455113 -10.619751,4.366932 C 71.294409,12.291353 69.811052,15.867416 69.811052,20 c 0,4.133056 1.483357,7.681348 4.448006,10.646469 3.000499,2.965121 6.539997,4.448005 10.619751,4.448005 4.150508,0 7.752951,-1.50092 10.807695,-4.502361 C 98.562001,27.771333 100,24.241076 100,20 100,15.777321 98.534676,12.201729 95.606348,9.272458 92.695001,6.361111 89.118469,4.905526 84.878809,4.905526 Z m 0.05343,2.722423 c 3.414181,0 6.325372,1.203902 8.732941,3.61147 2.407097,2.408512 3.611471,5.327554 3.611471,8.75966 0,3.486352 -1.185846,6.370694 -3.558036,8.652789 -2.497664,2.462758 -5.427365,3.692545 -8.787296,3.692545 -3.378332,0 -6.289056,-1.221465 -8.732946,-3.665827 -2.443418,-2.442475 -3.664905,-5.335182 -3.664905,-8.677665 0,-3.324086 1.230261,-6.24452 3.692547,-8.76058 2.372191,-2.407569 5.274118,-3.612392 8.706224,-3.612392 z" /> - <path d="m 43.395931,17.695499 c 0.287267,-1.85096 1.032557,-3.283992 2.236813,-4.299095 1.203784,-1.015104 2.667946,-1.522656 4.393433,-1.522656 2.371248,0 4.259,0.764158 5.660428,2.290587 1.401428,1.527372 2.102377,3.486352 2.102377,5.875996 0,2.318417 -0.727837,4.245321 -2.182566,5.781183 -1.456617,1.535863 -3.342483,2.304738 -5.661372,2.304738 -1.70709,0 -3.180687,-0.511797 -4.42032,-1.536335 -1.240106,-1.024537 -1.985395,-2.479739 -2.237284,-4.366548 h 3.801449 c 0.08962,1.833035 1.19482,2.749553 3.315593,2.749553 1.059444,0 1.913697,-0.458495 2.560401,-1.374541 0.647647,-0.916046 0.971235,-2.138698 0.971235,-3.665598 0,-1.599543 -0.296701,-2.816535 -0.889159,-3.652391 -0.593402,-0.835385 -1.44624,-1.253313 -2.561344,-1.253313 -2.013225,0 -3.144839,0.889158 -3.396255,2.667948 h 1.105197 l -2.991534,2.992008 -2.992008,-2.992008 z" /> - <path d="m 49.97328,4.905526 c -4.150978,0 -7.690953,1.464827 -10.619748,4.39457 -2.964649,3.018895 -4.448007,6.586166 -4.448007,10.700825 0,4.133528 1.483358,7.680899 4.448007,10.645548 3.000498,2.965121 6.539997,4.448005 10.619748,4.448005 4.167962,0 7.771348,-1.491677 10.807696,-4.474722 C 63.656473,27.762651 65.094472,24.223623 65.094472,20 c 0,-4.222679 -1.465325,-7.789478 -4.393653,-10.700825 C 57.771076,6.369904 54.195488,4.905526 49.97328,4.905526 Z m 0.05344,2.722423 c 3.431634,0 6.342825,1.212201 8.732941,3.639109 2.407097,2.371719 3.611471,5.283383 3.611471,8.732942 0,3.468427 -1.185846,6.352769 -3.558037,8.65279 -2.497663,2.461814 -5.427364,3.692544 -8.787295,3.692544 -3.37833,0 -6.289054,-1.221465 -8.732944,-3.665827 C 38.849433,26.253542 37.627946,23.360879 37.627946,20 c 0,-3.323614 1.230261,-6.234806 3.692547,-8.732942 2.372191,-2.425965 5.274118,-3.639109 8.706222,-3.639109 z" /> - <path d="m 15.067296,4.905527 c -4.186958,0 -7.7182442,1.465367 -10.5933571,4.393783 C 3.0186925,10.755028 1.9089114,12.403834 1.1452027,14.245887 0.38149397,16.087941 0,18.005571 0,20.000462 c 0,2.012815 0.37755761,3.926511 1.132304,5.741678 0.7547477,1.815163 1.8552632,3.445936 3.3020181,4.892218 1.4467549,1.446282 3.0823798,2.551679 4.9060381,3.314917 1.8241278,0.764653 3.7334388,1.145198 5.7278558,1.145198 1.994419,0 3.926643,-0.385427 5.795113,-1.158099 1.869418,-0.772672 3.540664,-1.88823 5.013832,-3.343474 1.418928,-1.383545 2.493084,-2.978691 3.220944,-4.784424 0.726912,-1.805262 1.090845,-3.741421 1.090845,-5.808014 0,-2.048665 -0.369235,-3.984805 -1.105586,-5.808934 -0.736822,-1.823656 -1.814917,-3.446104 -3.23384,-4.8655 C 22.884786,6.379214 19.289631,4.905527 15.067296,4.905527 Z m 0.05436,2.722507 c 3.414285,0 6.334316,1.213182 8.761767,3.63922 1.167029,1.168914 2.056377,2.498676 2.666307,3.990245 0.610873,1.491566 0.916715,3.072594 0.916715,4.743882 0,3.469008 -1.176637,6.352963 -3.530503,8.653059 -1.22269,1.185892 -2.591561,2.092759 -4.110018,2.722505 -1.520343,0.62927 -3.087225,0.942508 -4.704268,0.942508 -1.635442,0 -3.199353,-0.309776 -4.690448,-0.929612 C 8.9386948,30.769062 7.6010602,29.87146 6.4151652,28.694053 5.2287976,27.517123 4.317072,26.178564 3.6788394,24.677093 3.0401347,23.177504 2.7215865,21.618901 2.7215865,20.001381 c 0,-1.635439 0.3185482,-3.203736 0.9572529,-4.704263 C 4.3166012,13.796585 5.2287976,12.444829 6.4151652,11.240537 8.7695027,8.832893 11.671519,7.628034 15.121655,7.628034 Z" /> - <path d="m 23.639141,17.494232 -1.99489,1.051457 C 21.428674,18.097086 21.1631,17.78198 20.848937,17.602256 c -0.315106,-0.179251 -0.616534,-0.269351 -0.902866,-0.269351 -1.347696,0 -2.022249,0.889187 -2.022249,2.6685 0,0.808526 0.171228,1.454777 0.512282,1.940173 0.341051,0.485396 0.843904,0.728332 1.509967,0.728332 0.879753,0 1.50006,-0.431622 1.859035,-1.293922 l 1.886866,0.943438 c -0.412749,0.737289 -0.97032,1.316559 -1.67035,1.738746 -0.700968,0.422655 -1.464678,0.633515 -2.291129,0.633515 -1.366087,0 -2.457168,-0.412753 -3.274184,-1.240143 -0.818899,-0.826446 -1.227403,-1.976494 -1.227403,-3.449667 0,-1.437791 0.417466,-2.578401 1.253823,-3.423248 0.834936,-0.844371 1.890639,-1.26703 3.166632,-1.26703 1.868941,-9.43e-4 3.199655,0.726917 3.98978,2.182633 z" /> - <path d="m 14.932663,17.494232 -2.022248,1.051457 c -0.216046,-0.448603 -0.480679,-0.763709 -0.794841,-0.943433 -0.314637,-0.179251 -0.606629,-0.269351 -0.87645,-0.269351 -1.3472231,0 -2.0217777,0.889187 -2.0217777,2.6685 0,0.808526 0.1707629,1.454777 0.5118107,1.940173 0.341524,0.485396 0.844845,0.728332 1.509967,0.728332 0.880695,0 1.50053,-0.431622 1.860449,-1.293922 l 1.85951,0.943438 c -0.395301,0.737289 -0.943435,1.316559 -1.644407,1.738746 -0.700026,0.422655 -1.47317,0.633515 -2.318015,0.633515 -1.3476953,0 -2.4354738,-0.412753 -3.2619218,-1.240143 -0.8264474,-0.826446 -1.2396714,-1.976494 -1.2396714,-3.449667 0,-1.437791 0.4179415,-2.578401 1.2533513,-3.423248 0.8354103,-0.844371 1.8911135,-1.26703 3.1675779,-1.26703 1.869414,-9.43e-4 3.207674,0.726917 4.016666,2.182633 z" /> + <path d="m 48.008438,12.777632 c 0,-1.343489 0.663258,-2.016126 1.991115,-2.016126 1.327856,0 1.990667,0.671745 1.990667,2.016126 0,1.326963 -0.663704,1.990668 -1.990667,1.990668 -1.326963,0 -1.991115,-0.663705 -1.991115,-1.990668 z" /> + <path d="m 53.853596,16.452574 v 5.844264 h -1.63291 v 6.941657 h -4.441373 v -6.94121 h -1.632911 v -5.844711 c 0,-0.255477 0.08933,-0.472097 0.267536,-0.650753 0.179102,-0.178208 0.396169,-0.267982 0.650752,-0.267982 h 5.870616 c 0.238059,0 0.451106,0.08933 0.6378,0.267982 0.186248,0.178656 0.280489,0.395723 0.28049,0.650753 z" /> + <path + id="path4-3" + d="m 49.974702,5.7075681 c -3.947838,0 -7.29882,1.3777958 -10.055473,4.1348959 C 37.112107,12.700951 35.707566,16.087 35.707566,20 c 0,3.913447 1.40454,7.273201 4.211663,10.080771 2.841068,2.80757 6.192495,4.211661 10.055473,4.211661 3.929971,0 7.340998,-1.421169 10.233429,-4.263129 C 62.930839,27.358405 64.29243,24.015727 64.29243,20 c 0,-3.998308 -1.387464,-7.383911 -4.160195,-10.157536 C 57.375582,7.0858108 53.989089,5.7075681 49.974702,5.7075681 Z m 0.05059,2.5777675 c 3.232768,0 5.989274,1.1399334 8.268917,3.4195754 2.279196,2.280536 3.419576,5.044475 3.419576,8.294217 0,3.301105 -1.122836,6.032188 -3.36898,8.193025 -2.36495,2.331899 -5.138982,3.496342 -8.320385,3.496342 -3.198825,0 -5.954888,-1.156563 -8.268923,-3.471044 -2.313587,-2.312695 -3.470171,-5.051698 -3.470171,-8.216579 0,-3.147461 1.164892,-5.912719 3.496345,-8.295088 2.246145,-2.279643 4.993878,-3.4204484 8.243621,-3.4204484 z" + /> + <path d="m 76.797666,17.817948 c 0.272004,-1.752609 0.977693,-3.109497 2.117961,-4.070663 1.13982,-0.961167 2.526184,-1.44175 4.159988,-1.44175 2.245252,0 4.032699,0.723555 5.359662,2.168877 1.326963,1.446215 1.990668,3.301105 1.990668,5.563776 0,2.195228 -0.689164,4.019747 -2.066596,5.474001 -1.37922,1.454255 -3.164881,2.182276 -5.360556,2.182276 -1.616384,0 -3.011682,-0.484603 -4.185447,-1.454702 -1.174214,-0.970098 -1.879902,-2.347978 -2.118407,-4.134532 h 3.59946 c 0.08486,1.735637 1.131334,2.603456 3.13942,2.603456 1.00315,0 1.812013,-0.434133 2.424354,-1.301505 0.613235,-0.867372 0.919629,-2.025059 0.919629,-3.470827 0,-1.514552 -0.280936,-2.666879 -0.841914,-3.458322 -0.561872,-0.790997 -1.369394,-1.186719 -2.425247,-1.186719 -1.906253,0 -2.977739,0.841913 -3.215796,2.526187 h 1.046473 l -2.83258,2.833029 -2.833028,-2.833029 z" /> + <path d="m 83.025529,5.7075681 c -3.930417,0 -7.282295,1.3869937 -10.05547,4.1610649 -2.807123,2.858487 -4.211662,6.236212 -4.211662,10.132239 0,3.913894 1.404539,7.272776 4.211662,10.079899 2.841067,2.80757 6.192495,4.211661 10.05547,4.211661 3.946498,0 7.358419,-1.412417 10.233431,-4.236958 2.722708,-2.70529 4.084299,-6.056272 4.084299,-10.055474 0,-3.998308 -1.387465,-7.375586 -4.160196,-10.1322391 C 90.408991,7.0941366 87.023391,5.7075681 83.025529,5.7075681 Z m 0.0506,2.5777675 c 3.249294,0 6.0058,1.1477914 8.268917,3.4457454 2.279197,2.245698 3.419577,5.002652 3.419577,8.268919 0,3.284133 -1.122837,6.015216 -3.368981,8.193026 -2.364952,2.331006 -5.138982,3.496341 -8.320385,3.496341 -3.198823,0 -5.954885,-1.156563 -8.268921,-3.471044 C 72.492744,25.921261 71.336161,23.182299 71.336161,20 c 0,-3.147014 1.164891,-5.903521 3.496344,-8.268919 2.246146,-2.297062 4.993878,-3.4457454 8.243618,-3.4457454 z" /> + <path d="m 16.923439,5.707569 c -3.964485,0 -7.3081372,1.387505 -10.0304815,4.16032 -1.3779222,1.378369 -2.4287352,2.939566 -3.1518644,4.683742 -0.7231292,1.744177 -1.0843526,3.559914 -1.0843526,5.448806 0,1.905865 0.3574962,3.717877 1.0721392,5.436596 0.7146444,1.718714 1.7566842,3.262836 3.126566,4.63227 1.3698819,1.369435 2.9185982,2.416096 4.6453563,3.13878 1.727204,0.724023 3.535064,1.084348 5.423508,1.084348 1.888446,0 3.718002,-0.364947 5.487191,-1.096564 1.770087,-0.731616 3.352531,-1.787899 4.747423,-3.165819 1.343533,-1.31003 2.360614,-2.820419 3.0498,-4.530204 0.688287,-1.70934 1.032883,-3.542622 1.032883,-5.499407 0,-1.939809 -0.349616,-3.773073 -1.046841,-5.500277 C 29.497095,12.773404 28.476284,11.237164 27.132755,9.893188 24.325548,7.1029519 20.921421,5.707569 16.923439,5.707569 Z m 0.05147,2.5778471 c 3.232867,0 5.997743,1.1487199 8.296212,3.4458509 1.105019,1.106804 1.947112,2.365909 2.524633,3.778224 0.578414,1.412312 0.868006,2.909332 0.868006,4.491817 0,3.284683 -1.114117,6.015399 -3.342911,8.19328 -1.157722,1.12288 -2.453859,1.981561 -3.891633,2.577845 -1.43956,0.595834 -2.923186,0.892428 -4.454307,0.892428 -1.548543,0 -3.029356,-0.293316 -4.441223,-0.880217 C 11.120479,30.19685 9.8539198,29.346942 8.7310371,28.232096 7.6077069,27.117702 6.7444257,25.850267 6.1401055,24.428577 5.5353382,23.008668 5.233716,21.532881 5.233716,20.001308 c 0,-1.548541 0.3016222,-3.033506 0.9063895,-4.454303 C 6.7439799,14.126202 7.6077069,12.846272 8.7310371,11.705969 10.960277,9.426255 13.708096,8.2854161 16.97491,8.2854161 Z" /> + <path d="m 25.039821,17.627376 -1.888892,0.995588 c -0.204123,-0.424767 -0.455585,-0.72313 -0.753055,-0.893304 -0.298363,-0.169727 -0.583775,-0.255039 -0.854893,-0.255039 -1.276086,0 -1.914797,0.84194 -1.914797,2.526709 0,0.765566 0.16213,1.377478 0.485062,1.837083 0.322929,0.459604 0.799063,0.689632 1.429735,0.689632 0.833008,0 1.420355,-0.408688 1.760256,-1.22517 l 1.786608,0.893309 c -0.390818,0.698113 -0.918763,1.246604 -1.581597,1.646358 -0.663722,0.400197 -1.386852,0.599853 -2.16939,0.599853 -1.2935,0 -2.326607,-0.390821 -3.100211,-1.174248 -0.775387,-0.782533 -1.162185,-1.871473 -1.162185,-3.26637 0,-1.361394 0.395284,-2.441398 1.187201,-3.241354 0.790572,-0.799506 1.790181,-1.199707 2.998374,-1.199707 1.769635,-8.93e-4 3.029642,0.688293 3.777784,2.06666 z" /> + <path d="m 16.79596,17.627376 -1.914796,0.995588 c -0.204567,-0.424767 -0.455139,-0.72313 -0.752608,-0.893304 -0.297919,-0.169727 -0.574396,-0.255039 -0.82988,-0.255039 -1.275639,0 -1.914351,0.84194 -1.914351,2.526709 0,0.765566 0.161689,1.377478 0.484616,1.837083 0.323377,0.459604 0.799954,0.689632 1.429735,0.689632 0.8339,0 1.4208,-0.408688 1.761595,-1.22517 l 1.760705,0.893309 c -0.374297,0.698113 -0.893306,1.246604 -1.557032,1.646358 -0.66283,0.400197 -1.394893,0.599853 -2.194848,0.599853 -1.276086,0 -2.306065,-0.390821 -3.0886002,-1.174248 -0.7825343,-0.782533 -1.1738017,-1.871473 -1.1738017,-3.26637 0,-1.361394 0.3957343,-2.441398 1.1867547,-3.241354 0.7910212,-0.799506 1.7906292,-1.199707 2.9992702,-1.199707 1.770083,-8.93e-4 3.037234,0.688293 3.803241,2.06666 z" /> </> ); diff --git a/src/components/atoms/layout/copyright.module.scss b/src/components/atoms/layout/copyright.module.scss deleted file mode 100644 index 5d5435c..0000000 --- a/src/components/atoms/layout/copyright.module.scss +++ /dev/null @@ -1,32 +0,0 @@ -@use "../../../styles/abstracts/functions" as fun; -@use "../../../styles/abstracts/mixins" as mix; - -.wrapper { - --icon-size: #{fun.convert-px(70)}; - - display: flex; - flex-flow: row wrap; - align-items: center; - place-content: center; - gap: var(--spacing-2xs); - margin: 0; - font-family: var(--font-family-secondary); - font-size: var(--font-size-md); - text-align: center; - - @include mix.media("screen") { - @include mix.dimensions("sm") { - text-align: left; - } - } -} - -.owner { - flex: 1 0 100%; - - @include mix.media("screen") { - @include mix.dimensions("sm") { - flex: initial; - } - } -} diff --git a/src/components/atoms/layout/copyright.stories.tsx b/src/components/atoms/layout/copyright.stories.tsx deleted file mode 100644 index 58d1b1e..0000000 --- a/src/components/atoms/layout/copyright.stories.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import type { ComponentMeta, ComponentStory } from '@storybook/react'; -import { Icon } from '../images/icons'; -import { Copyright as CopyrightComponent } from './copyright'; - -/** - * Copyright - Storybook Meta - */ -export default { - title: 'Atoms/Layout', - component: CopyrightComponent, - argTypes: { - dates: { - description: 'The copyright dates.', - type: { - name: 'object', - required: true, - value: {}, - }, - }, - icon: { - control: { - type: null, - }, - description: 'The copyright icon.', - type: { - name: 'string', - required: true, - }, - }, - owner: { - control: { - type: 'text', - }, - description: 'The copyright owner', - type: { - name: 'string', - required: true, - }, - }, - }, -} as ComponentMeta<typeof CopyrightComponent>; - -const Template: ComponentStory<typeof CopyrightComponent> = (args) => ( - <CopyrightComponent {...args} /> -); - -/** - * Layout Stories - Copyright - */ -export const Copyright = Template.bind({}); -Copyright.args = { - dates: { - start: '2012', - end: '2022', - }, - icon: <Icon shape="cc-by-sa" />, - owner: 'Your name', -}; diff --git a/src/components/atoms/layout/copyright.test.tsx b/src/components/atoms/layout/copyright.test.tsx deleted file mode 100644 index cdff292..0000000 --- a/src/components/atoms/layout/copyright.test.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { describe, expect, it } from '@jest/globals'; -import { render, screen as rtlScreen } from '../../../../tests/utils'; -import { Icon } from '../images/icons'; -import { Copyright } from './copyright'; - -const dates = { - start: '2012', - end: '2022', -}; -const iconHeading = 'CC BY SA'; -const icon = <Icon heading={iconHeading} shape="cc-by-sa" />; -const owner = 'Your name'; - -describe('Copyright', () => { - it('renders the copyright owner', () => { - render(<Copyright dates={dates} icon={icon} owner={owner} />); - expect(rtlScreen.getByText(owner)).toBeInTheDocument(); - }); - - it('renders the copyright start date', () => { - render(<Copyright dates={dates} icon={icon} owner={owner} />); - expect(rtlScreen.getByText(dates.start)).toBeInTheDocument(); - }); - - it('renders the copyright end date', () => { - render(<Copyright dates={dates} icon={icon} owner={owner} />); - expect(rtlScreen.getByText(dates.end)).toBeInTheDocument(); - }); - - it('renders the copyright icon', () => { - render(<Copyright dates={dates} icon={icon} owner={owner} />); - expect(rtlScreen.getByTitle('CC BY SA')).toBeInTheDocument(); - }); -}); diff --git a/src/components/atoms/layout/copyright.tsx b/src/components/atoms/layout/copyright.tsx deleted file mode 100644 index 3d56059..0000000 --- a/src/components/atoms/layout/copyright.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import type { FC, ReactNode } from 'react'; -import styles from './copyright.module.scss'; -import { Time } from './time'; - -export type CopyrightDates = { - /** - * The copyright start year. - */ - start: string; - /** - * The copyright end year. - */ - end?: string; -}; - -export type CopyrightProps = { - /** - * The copyright owner. - */ - owner: string; - /** - * The copyright dates. - */ - dates: CopyrightDates; - /** - * The copyright icon. - */ - icon: ReactNode; -}; - -/** - * Copyright component - * - * Renders a copyright information (owner, dates, license icon). - */ -export const Copyright: FC<CopyrightProps> = ({ owner, dates, icon }) => ( - <div className={styles.wrapper}> - <span className={styles.owner}>{owner}</span> - {icon} - <Time date={dates.start} hideDay hideMonth /> - {dates.end ? ( - <> - <span>-</span> - <Time date={dates.end} hideDay hideMonth /> - </> - ) : ( - '' - )} - </div> -); diff --git a/src/components/atoms/layout/index.ts b/src/components/atoms/layout/index.ts index c37ff02..b8a7e6f 100644 --- a/src/components/atoms/layout/index.ts +++ b/src/components/atoms/layout/index.ts @@ -1,6 +1,5 @@ export * from './article'; export * from './aside'; -export * from './copyright'; export * from './footer'; export * from './header'; export * from './main'; |
