File tree Expand file tree Collapse file tree 1 file changed +21
-6
lines changed
polaris.shopify.com/pages/components Expand file tree Collapse file tree 1 file changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -43,19 +43,34 @@ const Components = ({
4343 type,
4444 editPageLinkPath,
4545} : Props ) => {
46- const statusBanner = status ? < StatusBanner status = { status } /> : null ;
47- const propList =
48- type && status ?. value !== 'Deprecated' ? < PropsTable types = { type } /> : null ;
46+ const typedStatus : Status | undefined = status
47+ ? {
48+ value : status . value . toLowerCase ( ) as Status [ 'value' ] ,
49+ message : status . message ,
50+ }
51+ : undefined ;
52+
53+ const componentExamples = Boolean ( examples . length ) && (
54+ < ComponentExamples examples = { examples } />
55+ ) ;
56+ const propsTable =
57+ type && status ?. value !== 'Deprecated' ? (
58+ < PropsTable componentName = { title } types = { type } />
59+ ) : null ;
4960
5061 return (
5162 < Page title = { title } editPageLinkPath = { editPageLinkPath } >
5263 < PageMeta title = { title } description = { description } />
5364
5465 < Longform >
5566 < Markdown text = { description } />
56- { statusBanner }
57- { Boolean ( examples . length ) && < ComponentExamples examples = { examples } /> }
58- { propList }
67+ { typedStatus && < StatusBanner status = { typedStatus } /> }
68+ { componentExamples }
69+ </ Longform >
70+
71+ { propsTable }
72+
73+ < Longform firstParagraphIsLede = { false } >
5974 < Markdown text = { readme . body } />
6075 </ Longform >
6176 </ Page >
You can’t perform that action at this time.
0 commit comments