Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Workshops
Developer workshop
Commits
888c51f4
Commit
888c51f4
authored
Sep 16, 2020
by
Jon Moore
Browse files
Example removed from all components
parent
37775217
Pipeline
#39467
passed with stage
in 2 minutes and 52 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/app/core/routes/ContentTypeMappings.js
View file @
888c51f4
...
...
@@ -13,10 +13,10 @@ export default [
}),
},
{
contentTypeID
:
'
exampleCT
'
,
contentTypeID
:
'
blogPost
'
,
component
:
Loadable
({
loader
:
()
=>
{
return
import
(
'
~/pages/
Examples/ExamplePage
'
);
return
import
(
'
~/pages/
Blogs/BlogPost
'
);
},
loading
:
Loading
,
}),
...
...
src/app/features/blogListing/components/BlogFilters.js
View file @
888c51f4
import
React
,
{
useState
}
from
'
react
'
;
import
PropTypes
from
'
prop-types
'
;
import
Example
FiltersStyled
from
'
../components.styled/BlogFilters.styled
'
;
import
Blog
FiltersStyled
from
'
../components.styled/BlogFilters.styled
'
;
import
FilterEntryDropdown
from
'
~/features/listings/components/FilterEntryDropdown
'
;
...
...
@@ -41,7 +41,7 @@ const BlogFilters = ({ className, filters, updateFilters }) => {
};
return
(
<
Example
FiltersStyled
className
=
{
className
}
filtersVisible
=
{
filtersVisible
}
>
<
Blog
FiltersStyled
className
=
{
className
}
filtersVisible
=
{
filtersVisible
}
>
<
div
className
=
"
tfInner
"
>
{
filters
&&
filters
.
map
((
filterGroup
,
idx
)
=>
{
...
...
@@ -60,7 +60,7 @@ const BlogFilters = ({ className, filters, updateFilters }) => {
<
/button
>
<
/div
>
<
/div
>
<
/
Example
FiltersStyled
>
<
/
Blog
FiltersStyled
>
);
};
...
...
src/app/features/eventListing/components/EventFilters.js
View file @
888c51f4
import
React
,
{
useState
}
from
'
react
'
;
import
PropTypes
from
'
prop-types
'
;
import
E
xample
FiltersStyled
from
'
../components.styled/EventFilters.styled
'
;
import
E
vent
FiltersStyled
from
'
../components.styled/EventFilters.styled
'
;
import
FilterEntryDropdown
from
'
~/features/listings/components/FilterEntryDropdown
'
;
...
...
@@ -41,7 +41,7 @@ const EventFilters = ({ className, filters, updateFilters }) => {
};
return
(
<
E
xample
FiltersStyled
className
=
{
className
}
filtersVisible
=
{
filtersVisible
}
>
<
E
vent
FiltersStyled
className
=
{
className
}
filtersVisible
=
{
filtersVisible
}
>
<
div
className
=
"
tfInner
"
>
{
filters
&&
filters
.
map
((
filterGroup
,
idx
)
=>
{
...
...
@@ -60,7 +60,7 @@ const EventFilters = ({ className, filters, updateFilters }) => {
<
/button
>
<
/div
>
<
/div
>
<
/E
xample
FiltersStyled
>
<
/E
vent
FiltersStyled
>
);
};
...
...
src/app/features/eventListing/stories/E
xample
Card.stories.js
→
src/app/features/eventListing/stories/E
vent
Card.stories.js
View file @
888c51f4
import
React
from
'
react
'
;
import
{
storiesOf
}
from
'
@storybook/react
'
;
import
Blog
Card
from
'
~/features/
blog
Listing/components/
Blog
Card
'
;
import
Event
Card
from
'
~/features/
event
Listing/components/
Event
Card
'
;
import
{
text
}
from
'
@storybook/addon-knobs
'
;
storiesOf
(
'
Features | Listings
'
,
module
).
add
(
'
E
xample
card
'
,
'
E
vent
card
'
,
()
=>
{
return
(
<
Blog
Card
<
Event
Card
title
=
{
text
(
'
Title
'
,
'
Example title
'
)}
description
=
{
text
(
'
Description
'
,
'
Example description
'
)}
uri
=
{
text
(
'
URI
'
,
'
/e
xample-content
/example-
article
'
)}
uri
=
{
text
(
'
URI
'
,
'
/e
vents
/example-
event
'
)}
/
>
);
},
...
...
src/app/pages/
Examples/ExamplePage
.js
→
src/app/pages/
Blogs/BlogPost
.js
View file @
888c51f4
import
React
from
'
react
'
;
import
PropTypes
from
'
prop-types
'
;
import
MainLayout
from
'
~/layouts/Main.layout
'
;
import
Example
Record
from
'
~/features/blogListing/components/BlogRecord
'
;
import
Blog
Record
from
'
~/features/blogListing/components/BlogRecord
'
;
import
{
Loading
}
from
'
~/core/routes/Loading
'
;
const
ExamplePage
=
({
entry
})
=>
{
const
BlogPost
=
({
entry
})
=>
{
if
(
!
entry
)
return
<
Loading
/>
;
return
(
<
MainLayout
>
<
Example
Record
entry
=
{
entry
}
/
>
<
Blog
Record
entry
=
{
entry
}
/
>
<
/MainLayout
>
);
};
ExamplePage
.
propTypes
=
{
BlogPost
.
propTypes
=
{
entry
:
PropTypes
.
object
,
};
export
default
ExamplePage
;
export
default
BlogPost
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment