File tree Expand file tree Collapse file tree 3 files changed +34
-18
lines changed
src/components/AppDetails Expand file tree Collapse file tree 3 files changed +34
-18
lines changed Original file line number Diff line number Diff line change 1+ import PropTypes from 'prop-types'
12import React from 'react'
3+ import ReactMarkdown from 'react-markdown'
24import styles from './Description.module.css'
35
46export const Description = ( { description } ) => {
5- const lines = description . split ( '\n' )
6- return lines . map ( ( line , index ) => {
7- if ( ! line . trim ( ) ) {
8- return < br key = { index } />
9- }
10- return (
11- < p key = { index } className = { styles . paragraph } >
12- { line }
13- </ p >
14- )
15- } )
7+ return (
8+ < div className = { styles . description } >
9+ < ReactMarkdown > { description } </ ReactMarkdown >
10+ </ div >
11+ )
12+ }
13+
14+ Description . propTypes = {
15+ description : PropTypes . string ,
1616}
Original file line number Diff line number Diff line change 1- .paragraph {
1+ .description {
22 margin-top : 0 ;
33 margin-bottom : var (--spacers-dp8 );
4+ line-height : 1.4rem ;
5+ font-size : 0.875em ;
6+ }
7+
8+ .description : global (h1 ) {
9+ font-size : 1.1rem ;
10+ }
11+ .description : global (h2 ),
12+ .description : global (h3 ),
13+ .description : global (h4 ) {
14+ font-size : 1rem ;
415}
Original file line number Diff line number Diff line change 44
55.latestUpdates {
66 padding : var (--spacers-dp16 );
7- background-color : var (--colors-blue100 );
7+ background-color : var (--colors-blue050 );
8+ border-radius : 5px ;
89}
910
1011.latestUpdatesHeader {
2425.versionList {
2526 list-style : none;
2627 padding : 0 ;
27- font-size : 0.8 rem ;
28+ font-size : 0.875 rem ;
2829}
2930
3031.latestUpdatesVersionHeading {
31- font-size : 1.1em ;
32- font-weight : bold;
32+ font-size : 1rem ;
33+ font-weight : 700 ;
34+ margin : 0 ;
3335}
3436
3537.changeSummary : global (ul ) {
3840}
3941
4042.changeSummary : global (h3 ) {
41- font-size : 0.9em ;
42- margin-bottom : 0.5em ;
43+ font-size : 1em ;
44+ margin : 0.5rem 0.25rem ;
45+ }
46+ .versionList > li : not (: last-of-type ) {
47+ margin-block-end : var (--spacers-dp24 );
4348}
You can’t perform that action at this time.
0 commit comments