@pareto-engineering/design-system 0.0.1-alpha.60 → 0.0.1-alpha.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/a/TeamInfo/TeamInfo.js +1 -1
- package/dist/cjs/a/TeamInfo/styles.scss +3 -2
- package/dist/cjs/b/QuestionDropdown/QuestionDropdown.js +11 -4
- package/dist/cjs/c/index.js +1 -125
- package/dist/cjs/f/fields/SelectInput/styles.scss +7 -3
- package/dist/es/a/TeamInfo/TeamInfo.js +1 -1
- package/dist/es/a/TeamInfo/styles.scss +3 -2
- package/dist/es/b/QuestionDropdown/QuestionDropdown.js +11 -4
- package/dist/es/c/index.js +1 -15
- package/dist/es/f/fields/SelectInput/styles.scss +7 -3
- package/package.json +3 -3
- package/src/__snapshots__/Storyshots.test.js.snap +251 -1831
- package/src/stories/b/QuestionDropdown.stories.jsx +15 -0
- package/src/stories/colors.js +1 -1
- package/src/stories/f/SelectInput.stories.jsx +3 -7
- package/src/ui/a/TeamInfo/TeamInfo.jsx +1 -1
- package/src/ui/a/TeamInfo/styles.scss +3 -2
- package/src/ui/b/QuestionDropdown/QuestionDropdown.jsx +8 -3
- package/src/ui/c/index.js +0 -18
- package/src/ui/f/fields/SelectInput/styles.scss +7 -3
- package/dist/cjs/a/RatingsInput/RatingsInput.js +0 -88
- package/dist/cjs/a/RatingsInput/common/Rating/Rating.js +0 -120
- package/dist/cjs/a/RatingsInput/common/Rating/index.js +0 -15
- package/dist/cjs/a/RatingsInput/common/index.js +0 -13
- package/dist/cjs/a/RatingsInput/index.js +0 -15
- package/dist/cjs/a/RatingsInput/styles.scss +0 -35
- package/dist/es/a/RatingsInput/RatingsInput.js +0 -72
- package/dist/es/a/RatingsInput/common/Rating/Rating.js +0 -102
- package/dist/es/a/RatingsInput/common/Rating/index.js +0 -2
- package/dist/es/a/RatingsInput/common/index.js +0 -1
- package/dist/es/a/RatingsInput/index.js +0 -2
- package/dist/es/a/RatingsInput/styles.scss +0 -35
- package/src/stories/c/AcceptCookies.stories.jsx +0 -27
- package/src/stories/c/BlogCategoryButton.stories.jsx +0 -33
- package/src/stories/c/BlogPost.stories.jsx +0 -68
- package/src/stories/c/BlogPostsList.stories.jsx +0 -91
- package/src/stories/c/SiteFooter.stories.jsx +0 -33
- package/src/stories/c/SiteHeaderCTA.stories.jsx +0 -28
- package/src/stories/c/SiteMission.stories.jsx +0 -78
- package/src/stories/c/SiteNavigation.stories.jsx +0 -79
- package/src/stories/c/SiteOnboardingStep.stories.jsx +0 -46
- package/src/stories/c/SitePricing.stories.jsx +0 -48
- package/src/stories/c/SiteServices.stories.jsx +0 -170
- package/src/stories/c/TeamGallery.stories.jsx +0 -52
- package/src/stories/c/Testimonials.stories.jsx +0 -43
- package/src/stories/c/blogUrlMap.js +0 -13
- package/src/ui/c/AcceptCookies/AcceptCookies.jsx +0 -133
- package/src/ui/c/AcceptCookies/index.js +0 -2
- package/src/ui/c/AcceptCookies/styles.scss +0 -49
- package/src/ui/c/BlogCategoryButton/BlogCategoryButton.jsx +0 -96
- package/src/ui/c/BlogCategoryButton/index.js +0 -2
- package/src/ui/c/BlogContext/BlogContextProvider.jsx +0 -60
- package/src/ui/c/BlogContext/Context.js +0 -3
- package/src/ui/c/BlogContext/ContextProvider.jsx +0 -60
- package/src/ui/c/BlogContext/index.js +0 -4
- package/src/ui/c/BlogContext/useBlog.js +0 -4
- package/src/ui/c/BlogPost/BlogPost.jsx +0 -161
- package/src/ui/c/BlogPost/index.js +0 -2
- package/src/ui/c/BlogPost/styles.scss +0 -33
- package/src/ui/c/BlogPostsList/BlogPostsList.jsx +0 -81
- package/src/ui/c/BlogPostsList/common/Card/Card.jsx +0 -195
- package/src/ui/c/BlogPostsList/common/Card/index.js +0 -2
- package/src/ui/c/BlogPostsList/common/index.js +0 -1
- package/src/ui/c/BlogPostsList/index.js +0 -2
- package/src/ui/c/BlogPostsList/styles.scss +0 -72
- package/src/ui/c/SiteFooter/SiteFooter.jsx +0 -79
- package/src/ui/c/SiteFooter/common/Section/Section.jsx +0 -95
- package/src/ui/c/SiteFooter/common/Section/index.js +0 -2
- package/src/ui/c/SiteFooter/common/index.js +0 -1
- package/src/ui/c/SiteFooter/index.js +0 -2
- package/src/ui/c/SiteFooter/styles.scss +0 -34
- package/src/ui/c/SiteHeaderCTA/SiteHeaderCTA.jsx +0 -107
- package/src/ui/c/SiteHeaderCTA/index.js +0 -2
- package/src/ui/c/SiteHeaderCTA/styles.scss +0 -44
- package/src/ui/c/SiteMission/SiteMission.jsx +0 -114
- package/src/ui/c/SiteMission/index.js +0 -2
- package/src/ui/c/SiteMission/styles.scss +0 -30
- package/src/ui/c/SiteNavigation/SiteNavigation.jsx +0 -142
- package/src/ui/c/SiteNavigation/index.js +0 -2
- package/src/ui/c/SiteNavigation/styles.scss +0 -118
- package/src/ui/c/SiteOnboardingStep/SiteOnboardingStep.jsx +0 -107
- package/src/ui/c/SiteOnboardingStep/index.js +0 -2
- package/src/ui/c/SiteOnboardingStep/styles.scss +0 -51
- package/src/ui/c/SitePricing/SitePricing.jsx +0 -120
- package/src/ui/c/SitePricing/index.js +0 -2
- package/src/ui/c/SitePricing/styles.scss +0 -73
- package/src/ui/c/SiteServices/SiteServices.jsx +0 -222
- package/src/ui/c/SiteServices/index.js +0 -2
- package/src/ui/c/SiteServices/styles.scss +0 -138
- package/src/ui/c/TeamGallery/TeamGallery.jsx +0 -87
- package/src/ui/c/TeamGallery/common/PersonCard/PersonCard.jsx +0 -86
- package/src/ui/c/TeamGallery/common/PersonCard/index.js +0 -2
- package/src/ui/c/TeamGallery/common/index.js +0 -1
- package/src/ui/c/TeamGallery/index.js +0 -2
- package/src/ui/c/TeamGallery/styles.scss +0 -100
- package/src/ui/c/Testimonials/Testimonials.jsx +0 -124
- package/src/ui/c/Testimonials/index.js +0 -2
- package/src/ui/c/Testimonials/styles.scss +0 -112
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/* @pareto-engineering/generator-front 1.0.2 */
|
|
2
|
-
import * as React from 'react'
|
|
3
|
-
|
|
4
|
-
import { TeamGallery } from 'ui'
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title :'c/TeamGallery',
|
|
8
|
-
component :TeamGallery,
|
|
9
|
-
subcomponents:{
|
|
10
|
-
'TeamGallery.PersonCard':TeamGallery.PersonCard,
|
|
11
|
-
},
|
|
12
|
-
decorators:[
|
|
13
|
-
// storyfn => <div className="">{ storyfn() }</div>,
|
|
14
|
-
],
|
|
15
|
-
argTypes:{
|
|
16
|
-
},
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const Base = () => (
|
|
20
|
-
<TeamGallery title="Leadership">
|
|
21
|
-
<TeamGallery.PersonCard
|
|
22
|
-
name="Phoebe Yao"
|
|
23
|
-
position="CEO & Founder"
|
|
24
|
-
picture="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=934&q=80"
|
|
25
|
-
/>
|
|
26
|
-
<TeamGallery.PersonCard
|
|
27
|
-
name="Dulce May Tigol"
|
|
28
|
-
position="Accounting"
|
|
29
|
-
picture="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=934&q=80"
|
|
30
|
-
/>
|
|
31
|
-
<TeamGallery.PersonCard
|
|
32
|
-
name="Ellen Free"
|
|
33
|
-
position="Growth"
|
|
34
|
-
picture="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=934&q=80"
|
|
35
|
-
/>
|
|
36
|
-
<TeamGallery.PersonCard
|
|
37
|
-
name="Collins Mbulakyalo"
|
|
38
|
-
position="Software"
|
|
39
|
-
picture="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=934&q=80"
|
|
40
|
-
/>
|
|
41
|
-
<TeamGallery.PersonCard
|
|
42
|
-
name="Kaylin Hu"
|
|
43
|
-
position="Operations"
|
|
44
|
-
picture="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=934&q=80"
|
|
45
|
-
/>
|
|
46
|
-
<TeamGallery.PersonCard
|
|
47
|
-
name="Diza Hendrawan"
|
|
48
|
-
position="Marketing"
|
|
49
|
-
picture="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=934&q=80"
|
|
50
|
-
/>
|
|
51
|
-
</TeamGallery>
|
|
52
|
-
)
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
-
import * as React from 'react'
|
|
3
|
-
|
|
4
|
-
import { Testimonials } from 'ui'
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
title :'c/Testimonials',
|
|
8
|
-
component :Testimonials,
|
|
9
|
-
subcomponents:{
|
|
10
|
-
// 'Testimonials.Slide':Testimonials.Slide,
|
|
11
|
-
},
|
|
12
|
-
decorators:[
|
|
13
|
-
// storyfn => <div className="">{ storyfn() }</div>,
|
|
14
|
-
],
|
|
15
|
-
argTypes:{
|
|
16
|
-
backgroundColor:{ control: 'color' },
|
|
17
|
-
},
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const Base = () => {
|
|
21
|
-
const testimonialMap = [
|
|
22
|
-
{
|
|
23
|
-
firstName :'David',
|
|
24
|
-
lastName :'Head',
|
|
25
|
-
picture :'https://pareto-v1.s3-us-west-2.amazonaws.com/testimonials/user-headshots/david-head-headshot.png',
|
|
26
|
-
company :'CEO at Bridge',
|
|
27
|
-
testimonial:'I’ve been impressed with the breadth of tasks Pareto can tackle. Everything from research, to organization, to helping plan social activities. Highly recommend!',
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
firstName :'Avni',
|
|
31
|
-
lastName :'Levy',
|
|
32
|
-
picture :'https://pareto-v1.s3-us-west-2.amazonaws.com/testimonials/user-headshots/avni-levy-headshot.png',
|
|
33
|
-
company :'CEO at Avni Creates',
|
|
34
|
-
testimonial:'Pareto is like an extension of our team. Love how fast and convenient it is to outsource important tasks and have the trust of the Pareto team to get it done at the highest quality.',
|
|
35
|
-
},
|
|
36
|
-
]
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<Testimonials
|
|
40
|
-
contentMap={testimonialMap}
|
|
41
|
-
/>
|
|
42
|
-
)
|
|
43
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const basePath = '/blog/'
|
|
2
|
-
const slugUrlParam = ':slug([0-9a-z-]{3,80})'
|
|
3
|
-
const categoryUrlParam = ':category([0-9a-z-]{3,20})'
|
|
4
|
-
const pageUrlParam = ':pageNumber([0-9]{1,3})'
|
|
5
|
-
|
|
6
|
-
export default {
|
|
7
|
-
HOME :basePath,
|
|
8
|
-
LIST :basePath,
|
|
9
|
-
LIST_PAGINATED :basePath + pageUrlParam,
|
|
10
|
-
LIST_CATEGORY :`${basePath}c/${categoryUrlParam}`,
|
|
11
|
-
LIST_CATEGORY_PAGINATED:`${basePath}c/${categoryUrlParam}/${pageUrlParam}`,
|
|
12
|
-
SINGLE :basePath + slugUrlParam,
|
|
13
|
-
}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
-
import * as React from 'react'
|
|
3
|
-
|
|
4
|
-
import { useState, useCallback, useLayoutEffect } from 'react'
|
|
5
|
-
|
|
6
|
-
import PropTypes from 'prop-types'
|
|
7
|
-
|
|
8
|
-
import { Button } from 'ui/b'
|
|
9
|
-
|
|
10
|
-
import styleNames from '@pareto-engineering/bem'
|
|
11
|
-
|
|
12
|
-
// Local Definitions
|
|
13
|
-
|
|
14
|
-
const baseClassName = styleNames.base
|
|
15
|
-
|
|
16
|
-
const componentClassName = 'accept-cookies'
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* This is the component description.
|
|
20
|
-
*/
|
|
21
|
-
const AcceptCookies = ({
|
|
22
|
-
id,
|
|
23
|
-
className:userClassName,
|
|
24
|
-
style,
|
|
25
|
-
color,
|
|
26
|
-
title,
|
|
27
|
-
subtitle,
|
|
28
|
-
onClickAllow,
|
|
29
|
-
onClickDecline,
|
|
30
|
-
defaultIsShown,
|
|
31
|
-
// ...otherProps
|
|
32
|
-
}) => {
|
|
33
|
-
const [isShown, setIsShown] = useState(defaultIsShown)
|
|
34
|
-
|
|
35
|
-
const hide = useCallback(() => setIsShown(false), [])
|
|
36
|
-
|
|
37
|
-
const allow = useCallback(() => {
|
|
38
|
-
onClickAllow?.()
|
|
39
|
-
hide()
|
|
40
|
-
}, [])
|
|
41
|
-
|
|
42
|
-
const decline = useCallback(() => {
|
|
43
|
-
onClickDecline?.()
|
|
44
|
-
hide()
|
|
45
|
-
}, [])
|
|
46
|
-
|
|
47
|
-
useLayoutEffect(() => {
|
|
48
|
-
import('./styles.scss')
|
|
49
|
-
}, [])
|
|
50
|
-
|
|
51
|
-
if (!isShown) return null
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<div
|
|
55
|
-
id={id}
|
|
56
|
-
className={[
|
|
57
|
-
|
|
58
|
-
baseClassName,
|
|
59
|
-
|
|
60
|
-
componentClassName,
|
|
61
|
-
userClassName,
|
|
62
|
-
`x-${color}`,
|
|
63
|
-
'u1',
|
|
64
|
-
]
|
|
65
|
-
.filter((e) => e)
|
|
66
|
-
.join(' ')}
|
|
67
|
-
style={style}
|
|
68
|
-
// {...otherProps}
|
|
69
|
-
>
|
|
70
|
-
<div className={styleNames.elementContent}>
|
|
71
|
-
<p className="s0">{title}</p>
|
|
72
|
-
<p className="s-1">{subtitle}</p>
|
|
73
|
-
<div className="buttons s-1">
|
|
74
|
-
<Button className="allow" onClick={allow}>Allow</Button>
|
|
75
|
-
<Button className="decline v1 ml-v" onClick={decline}>Decline</Button>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
</div>
|
|
79
|
-
)
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
AcceptCookies.propTypes = {
|
|
83
|
-
/**
|
|
84
|
-
* The HTML id for this element
|
|
85
|
-
*/
|
|
86
|
-
id:PropTypes.string,
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* The HTML class names for this element
|
|
90
|
-
*/
|
|
91
|
-
className:PropTypes.string,
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* The React-written, css properties for this element.
|
|
95
|
-
*/
|
|
96
|
-
style:PropTypes.objectOf(PropTypes.string),
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* The children JSX
|
|
100
|
-
*/
|
|
101
|
-
// children:PropTypes.node,
|
|
102
|
-
/**
|
|
103
|
-
* The title
|
|
104
|
-
*/
|
|
105
|
-
title :PropTypes.string,
|
|
106
|
-
/**
|
|
107
|
-
* The sub-title
|
|
108
|
-
*/
|
|
109
|
-
subtitle :PropTypes.string,
|
|
110
|
-
/**
|
|
111
|
-
* The color
|
|
112
|
-
*/
|
|
113
|
-
color :PropTypes.string,
|
|
114
|
-
/**
|
|
115
|
-
* Allow cookies function
|
|
116
|
-
*/
|
|
117
|
-
onClickAllow :PropTypes.func,
|
|
118
|
-
/**
|
|
119
|
-
* Allow cookies function
|
|
120
|
-
*/
|
|
121
|
-
onClickDecline:PropTypes.func,
|
|
122
|
-
/**
|
|
123
|
-
* Condition to show or hide the component
|
|
124
|
-
*/
|
|
125
|
-
defaultIsShown:PropTypes.bool,
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
AcceptCookies.defaultProps = {
|
|
129
|
-
color :'main1',
|
|
130
|
-
defaultIsShown:true,
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export default AcceptCookies
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
-
|
|
3
|
-
@use "@pareto-engineering/bem";
|
|
4
|
-
@use "@aztlan/stylebook/src/mixins";
|
|
5
|
-
@use "@aztlan/stylebook/src/globals" as *;
|
|
6
|
-
|
|
7
|
-
$default-padding:var(--u, 1em);
|
|
8
|
-
|
|
9
|
-
.#{bem.$base}.accept-cookies {
|
|
10
|
-
padding: $default-padding;
|
|
11
|
-
|
|
12
|
-
.#{bem.$element-content} {
|
|
13
|
-
align-items: center;
|
|
14
|
-
background-color: var(--on-x);
|
|
15
|
-
border-radius: var(--theme-border-radius);
|
|
16
|
-
display: flex;
|
|
17
|
-
justify-content: space-between;
|
|
18
|
-
padding: $default-padding;
|
|
19
|
-
|
|
20
|
-
.buttons {
|
|
21
|
-
display: flex;
|
|
22
|
-
|
|
23
|
-
.allow,
|
|
24
|
-
.decline {
|
|
25
|
-
min-width: 100px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.decline {
|
|
29
|
-
background-color: var(--on-x);
|
|
30
|
-
border: 1px solid var(--x);
|
|
31
|
-
color: var(--x);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
@include mixins.media($to:$sm-md) {
|
|
37
|
-
.content {
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
@include mixins.media($from:$sm-md) {
|
|
43
|
-
.content {
|
|
44
|
-
p {
|
|
45
|
-
margin-bottom: 0;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
-
import * as React from 'react'
|
|
3
|
-
|
|
4
|
-
import PropTypes from 'prop-types'
|
|
5
|
-
|
|
6
|
-
import styleNames from '@pareto-engineering/bem'
|
|
7
|
-
|
|
8
|
-
import {
|
|
9
|
-
Button,
|
|
10
|
-
} from 'ui/b'
|
|
11
|
-
import { Link } from 'react-router-dom'
|
|
12
|
-
import { useBlog } from '../BlogContext'
|
|
13
|
-
|
|
14
|
-
// Local Definitions
|
|
15
|
-
|
|
16
|
-
const baseClassName = styleNames.base
|
|
17
|
-
const componentClassName = 'blog-category-button'
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* This is the component description.
|
|
21
|
-
*/
|
|
22
|
-
const BlogCategoryButton = ({
|
|
23
|
-
id,
|
|
24
|
-
className:userClassName,
|
|
25
|
-
style,
|
|
26
|
-
children,
|
|
27
|
-
categorySlug,
|
|
28
|
-
...otherProps
|
|
29
|
-
}) => {
|
|
30
|
-
const {
|
|
31
|
-
generateBlogPath,
|
|
32
|
-
} = useBlog()
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<Link to={
|
|
36
|
-
generateBlogPath(
|
|
37
|
-
'LIST_CATEGORY',
|
|
38
|
-
{
|
|
39
|
-
category:categorySlug,
|
|
40
|
-
},
|
|
41
|
-
)
|
|
42
|
-
}
|
|
43
|
-
>
|
|
44
|
-
<Button
|
|
45
|
-
id={id}
|
|
46
|
-
isCompact
|
|
47
|
-
className={[
|
|
48
|
-
|
|
49
|
-
baseClassName,
|
|
50
|
-
|
|
51
|
-
componentClassName,
|
|
52
|
-
userClassName,
|
|
53
|
-
]
|
|
54
|
-
.filter((e) => e)
|
|
55
|
-
.join(' ')}
|
|
56
|
-
style={style}
|
|
57
|
-
{...otherProps}
|
|
58
|
-
>
|
|
59
|
-
{children}
|
|
60
|
-
</Button>
|
|
61
|
-
</Link>
|
|
62
|
-
)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
BlogCategoryButton.propTypes = {
|
|
66
|
-
/**
|
|
67
|
-
* The HTML id for this element
|
|
68
|
-
*/
|
|
69
|
-
id:PropTypes.string,
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* The HTML class names for this element
|
|
73
|
-
*/
|
|
74
|
-
className:PropTypes.string,
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
* The React-written, css properties for this element.
|
|
78
|
-
*/
|
|
79
|
-
style:PropTypes.objectOf(PropTypes.string),
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* The children JSX
|
|
83
|
-
*/
|
|
84
|
-
children:PropTypes.node,
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* The slug of the category
|
|
88
|
-
*/
|
|
89
|
-
categorySlug:PropTypes.string.isRequired,
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
BlogCategoryButton.defaultProps = {
|
|
93
|
-
// someProp:false
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export default BlogCategoryButton
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/* @pareto-engineering/generator-front 1.0.12 */
|
|
2
|
-
import * as React from 'react'
|
|
3
|
-
import { useCallback } from 'react'
|
|
4
|
-
|
|
5
|
-
import PropTypes from 'prop-types'
|
|
6
|
-
|
|
7
|
-
import { generatePath } from 'react-router-dom'
|
|
8
|
-
|
|
9
|
-
import Context from './Context'
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* This is the component description.
|
|
13
|
-
*/
|
|
14
|
-
const BlogContextProvider = ({
|
|
15
|
-
urlMap,
|
|
16
|
-
children,
|
|
17
|
-
// ...otherProps
|
|
18
|
-
}) => {
|
|
19
|
-
const generateBlogPath = useCallback((key, variables) => generatePath(
|
|
20
|
-
urlMap[key],
|
|
21
|
-
variables,
|
|
22
|
-
),
|
|
23
|
-
[urlMap])
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<Context.Provider value={{
|
|
27
|
-
generateBlogPath,
|
|
28
|
-
urlMap,
|
|
29
|
-
}}
|
|
30
|
-
>
|
|
31
|
-
{ children }
|
|
32
|
-
</Context.Provider>
|
|
33
|
-
)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
BlogContextProvider.propTypes = {
|
|
37
|
-
/**
|
|
38
|
-
* The children JSX
|
|
39
|
-
*/
|
|
40
|
-
children:PropTypes.node,
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* The hash of urls
|
|
44
|
-
*/
|
|
45
|
-
urlMap:PropTypes.shape({
|
|
46
|
-
HOME :PropTypes.string.isRequired,
|
|
47
|
-
LIST :PropTypes.string.isRequired,
|
|
48
|
-
LIST_PAGINATED :PropTypes.string.isRequired,
|
|
49
|
-
LIST_CATEGORY :PropTypes.string.isRequired,
|
|
50
|
-
LIST_CATEGORY_PAGINATED:PropTypes.string.isRequired,
|
|
51
|
-
SINGLE :PropTypes.string.isRequired,
|
|
52
|
-
|
|
53
|
-
}).isRequired,
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
BlogContextProvider.defaultProps = {
|
|
57
|
-
// someProp:false
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export default BlogContextProvider
|