trepur_components 1.0.2 → 1.0.3

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.
Files changed (104) hide show
  1. package/dist/src/lib/components/Carousel/index.d.ts +0 -1
  2. package/dist/src/lib/components/Carousel/index.js +1 -1
  3. package/dist/src/lib/components/Carousel/index.js.map +1 -1
  4. package/dist/src/lib/components/FooterBar/{footerBar.stories.d.ts → FooterBar.stories.d.ts} +0 -0
  5. package/dist/src/lib/components/FooterBar/{footerBar.stories.js → FooterBar.stories.js} +1 -1
  6. package/dist/src/lib/components/FooterBar/{footerBar.stories.js.map → FooterBar.stories.js.map} +1 -1
  7. package/dist/src/lib/components/Nav/index.js +2 -2
  8. package/dist/src/lib/components/Nav/index.js.map +1 -1
  9. package/package.json +1 -1
  10. package/dist/components/Accordion/Accordion.stories.tsx +0 -88
  11. package/dist/components/Accordion/index.tsx +0 -31
  12. package/dist/components/AlertBar/AlertBar.stories.tsx +0 -105
  13. package/dist/components/AlertBar/index.tsx +0 -127
  14. package/dist/components/Breadcrumbs/Breadcrumbs.stories.tsx +0 -60
  15. package/dist/components/Breadcrumbs/index.tsx +0 -55
  16. package/dist/components/BreadcrumbsBordered/BreadcrumbsBordered.stories.tsx +0 -52
  17. package/dist/components/BreadcrumbsBordered/index.tsx +0 -44
  18. package/dist/components/BreadcrumbsItem/BreadcrumbsItem.stories.tsx +0 -54
  19. package/dist/components/BreadcrumbsItem/index.tsx +0 -151
  20. package/dist/components/Button/button.stories.tsx +0 -148
  21. package/dist/components/Button/index.tsx +0 -91
  22. package/dist/components/Card/Card.stories.tsx +0 -150
  23. package/dist/components/Card/index.tsx +0 -162
  24. package/dist/components/CardWithTopImage/CardWithTopImage.stories.tsx +0 -48
  25. package/dist/components/CardWithTopImage/index.tsx +0 -40
  26. package/dist/components/Carousel/Carousel.stories.tsx +0 -369
  27. package/dist/components/Carousel/index.tsx +0 -267
  28. package/dist/components/ChevronCard/ChevronCard.stories.tsx +0 -21
  29. package/dist/components/ChevronCard/index.tsx +0 -39
  30. package/dist/components/Collapsible/Collapsible.stories.tsx +0 -70
  31. package/dist/components/Collapsible/index.tsx +0 -124
  32. package/dist/components/Column/Column.stories.tsx +0 -82
  33. package/dist/components/Column/index.tsx +0 -114
  34. package/dist/components/Container/Container.stories.tsx +0 -38
  35. package/dist/components/Container/index.tsx +0 -30
  36. package/dist/components/FooterBar/FooterBar.stories.tsx +0 -57
  37. package/dist/components/FooterBar/index.tsx +0 -44
  38. package/dist/components/Form/Form.stories.tsx +0 -93
  39. package/dist/components/Form/index.tsx +0 -58
  40. package/dist/components/FyreCard/FyreCard.stories.tsx +0 -29
  41. package/dist/components/FyreCard/index.tsx +0 -46
  42. package/dist/components/Greeting/Greeting.stories.tsx +0 -42
  43. package/dist/components/Greeting/index.tsx +0 -46
  44. package/dist/components/HamburgerIcon/HamburgerIcon.stories.tsx +0 -50
  45. package/dist/components/HamburgerIcon/index.tsx +0 -65
  46. package/dist/components/Icon/Icon.stories.tsx +0 -102
  47. package/dist/components/Icon/index.tsx +0 -112
  48. package/dist/components/Image/Image.stories.tsx +0 -88
  49. package/dist/components/Image/index.tsx +0 -113
  50. package/dist/components/ImageLink/ImageLink.stories.tsx +0 -60
  51. package/dist/components/ImageLink/index.tsx +0 -62
  52. package/dist/components/ImageLinkList/ImageLinkList.stories.tsx +0 -34
  53. package/dist/components/ImageLinkList/index.tsx +0 -33
  54. package/dist/components/InformationIcon/InformationIcon.stories.tsx +0 -86
  55. package/dist/components/InformationIcon/index.tsx +0 -84
  56. package/dist/components/Input/Input.stories.tsx +0 -99
  57. package/dist/components/Input/index.tsx +0 -126
  58. package/dist/components/Jumbotron/Jumbotron.stories.tsx +0 -22
  59. package/dist/components/Jumbotron/index.tsx +0 -25
  60. package/dist/components/Nav/Nav.stories.tsx +0 -155
  61. package/dist/components/Nav/index.tsx +0 -180
  62. package/dist/components/NavItem/NavItem.stories.tsx +0 -89
  63. package/dist/components/NavItem/index.tsx +0 -65
  64. package/dist/components/NewsCard/NewsCard.stories.tsx +0 -71
  65. package/dist/components/NewsCard/index.tsx +0 -48
  66. package/dist/components/Profile/Profile.stories.tsx +0 -50
  67. package/dist/components/Profile/index.tsx +0 -87
  68. package/dist/components/Row/Row.stories.tsx +0 -51
  69. package/dist/components/Row/index.tsx +0 -24
  70. package/dist/components/Search/Search.stories.tsx +0 -58
  71. package/dist/components/Search/index.tsx +0 -58
  72. package/dist/components/SocialBlock/SocialBlock.stories.tsx +0 -114
  73. package/dist/components/SocialBlock/index.tsx +0 -161
  74. package/dist/components/StarRating/StarRating.stories.tsx +0 -23
  75. package/dist/components/StarRating/index.tsx +0 -71
  76. package/dist/components/Testimonial/Testimonial.stories.tsx +0 -110
  77. package/dist/components/Testimonial/index.tsx +0 -50
  78. package/dist/components/TextAndTitle/TextAndTitle.stories.tsx +0 -65
  79. package/dist/components/TextAndTitle/index.tsx +0 -257
  80. package/dist/components/TextArea/TextArea.stories.tsx +0 -67
  81. package/dist/components/TextArea/index.tsx +0 -97
  82. package/dist/components/Timeline/Timeline.stories.tsx +0 -100
  83. package/dist/components/Timeline/index.css +0 -133
  84. package/dist/components/Timeline/index.tsx +0 -315
  85. package/dist/components/Tubestops/Tubestops.stories.tsx +0 -66
  86. package/dist/components/Tubestops/index.css +0 -92
  87. package/dist/components/Tubestops/index.tsx +0 -77
  88. package/dist/components/UserIcon/UserIcon.stories.tsx +0 -67
  89. package/dist/components/UserIcon/index.tsx +0 -42
  90. package/dist/components/Video/Video.stories.tsx +0 -23
  91. package/dist/components/Video/index.tsx +0 -49
  92. package/dist/fonts/Sora/OFL.txt +0 -93
  93. package/dist/fonts/Sora/README.txt +0 -70
  94. package/dist/fonts/Sora/Sora-VariableFont_wght.ttf +0 -0
  95. package/dist/fonts/Sora/static/Sora-Bold.ttf +0 -0
  96. package/dist/fonts/Sora/static/Sora-ExtraBold.ttf +0 -0
  97. package/dist/fonts/Sora/static/Sora-ExtraLight.ttf +0 -0
  98. package/dist/fonts/Sora/static/Sora-Light.ttf +0 -0
  99. package/dist/fonts/Sora/static/Sora-Medium.ttf +0 -0
  100. package/dist/fonts/Sora/static/Sora-Regular.ttf +0 -0
  101. package/dist/fonts/Sora/static/Sora-SemiBold.ttf +0 -0
  102. package/dist/fonts/Sora/static/Sora-Thin.ttf +0 -0
  103. package/dist/index.js +0 -272
  104. package/dist/styles/base.css +0 -73
@@ -1,58 +0,0 @@
1
- import React from 'react'
2
- import { idAndClassName } from '@utils/controls'
3
- import Search from './index'
4
- import { ComponentStory, ComponentMeta } from '@storybook/react'
5
-
6
- const componentMeta: ComponentMeta<typeof Search> = {
7
- title: 'Trepur Components/Other/Organisms/Search',
8
- component: Search,
9
- parameters: {},
10
- argTypes: {
11
- ...idAndClassName,
12
- leftIconProps: {
13
- description: 'An optional param to display an icon to the left of the search bar',
14
- control: 'text',
15
- table: {
16
- category: ''
17
- }
18
- },
19
- rightIconProps: {
20
- description: 'An optional param to display an icon to the right of the search bar',
21
- control: 'text',
22
- table: {
23
- category: ''
24
- }
25
- },
26
- placeholder: {
27
- description: 'An optional param to display a placeholder inside the search box',
28
- control: 'text',
29
- table: {
30
- category: ''
31
- }
32
- },
33
- text: {
34
- description: 'An optional param to display a label on the left of the search bar',
35
- control: 'text',
36
- table: {
37
- category: ''
38
- }
39
- }
40
- },
41
- args: {
42
- placeholder: 'search...',
43
- leftIconProps: {
44
- type: 'heart',
45
- className: 'absolute py-4 left-3 flex items-center'
46
- },
47
- rightIconProps: {
48
- type: 'heart',
49
- className: 'absolute py-4 right-3 flex items-center'
50
- }
51
- }
52
- }
53
-
54
- const Template: ComponentStory<typeof Search> = (args) => <Search {...args} />
55
-
56
- export const _Search = Template.bind({})
57
-
58
- export default componentMeta
@@ -1,58 +0,0 @@
1
- import React, { ChangeEventHandler } from 'react'
2
- import Icon, { Props as iconProps } from '@components/Icon'
3
- import classNames from 'classnames'
4
-
5
- export interface Props {
6
- id?: string
7
- className?: string
8
- onChange?: (val: string | number) => void
9
- placeholder?: string
10
- text?: string
11
- leftIconProps?: iconProps
12
- rightIconProps?: iconProps
13
- }
14
-
15
- const Search = ({
16
- id,
17
- className,
18
- onChange,
19
- placeholder,
20
- text,
21
- leftIconProps,
22
- rightIconProps
23
- }: Props): JSX.Element => {
24
- const classList = classNames(className, 'flex')
25
-
26
- const inputClasses = classNames({
27
- 'pl-9': leftIconProps !== undefined,
28
- 'pl-2': leftIconProps === undefined
29
- }, 'w-full border-2 rounded-md py-2 pr-9')
30
-
31
- const onChangeFunc: ChangeEventHandler<HTMLInputElement> | undefined = (onChange != null) ? (e: any) => onChange(e.target.value) : undefined
32
-
33
- return (
34
- <div id={id} className={classList}>
35
- <div>
36
- {text !== undefined &&
37
- <h2 className='font-base-lg py-2 pr-4'>{text}</h2>}
38
- </div>
39
- <div>
40
- <div className='relative w-full flex'>
41
- {(leftIconProps != null) &&
42
- <Icon {...leftIconProps} />}
43
- <input
44
- className={inputClasses}
45
- onChange={onChangeFunc}
46
- placeholder={placeholder}
47
- type='text'
48
- name='search'
49
- />
50
- {(rightIconProps != null) &&
51
- <Icon {...rightIconProps} />}
52
- </div>
53
- </div>
54
- </div>
55
- )
56
- }
57
-
58
- export default Search
@@ -1,114 +0,0 @@
1
- import React from 'react'
2
- import SocialBlock from './index'
3
- import { action } from '@storybook/addon-actions'
4
- import Icon from '@components/Icon'
5
- import Button from '@components/Button'
6
- import { ComponentStory, ComponentMeta } from '@storybook/react'
7
-
8
- const socialButtons = [
9
- <Button
10
- key='btn_1'
11
- className='mx-2 w-16 py-4 border border-1'
12
- href='https://www.facebook.com/rupert.bennett'
13
- type='social'
14
- >
15
- <Icon
16
- type='facebook-f'
17
- brand
18
- size={2}
19
- className='mx-auto'
20
- colour='white'
21
- bgColour='primary'
22
- />
23
- </Button>,
24
- <Button
25
- key='btn_2'
26
- className='mx-2 w-16 py-4 border border-1'
27
- href='https://www.linkedin.com/in/rupert-bennett'
28
- type='social'
29
- >
30
- <Icon
31
- brand
32
- type='linkedin-in'
33
- size={2}
34
- className='mx-auto'
35
- colour='white'
36
- bgColour='primary'
37
- />
38
- </Button>,
39
- <Button
40
- key='btn_3'
41
- className='mx-2 w-16 py-4 border border-1'
42
- href='https://github.com/irupertbennett'
43
- type='social'
44
- >
45
- <Icon
46
- brand
47
- type='github'
48
- size={2}
49
- className='mx-auto'
50
- colour='white'
51
- bgColour='primary'
52
- />
53
- </Button>,
54
- <Button
55
- key='btn_4'
56
- className='mx-2 w-16 py-4 border border-1'
57
- href='mailto:irupertbennett@gmail.com?subject=rupertbennett.com-&body=Referred from rupertbennett.com'
58
- type='social'
59
- >
60
- <Icon
61
- type='envelope'
62
- size={2}
63
- className='mx-auto'
64
- colour='white'
65
- bgColour='primary'
66
- />
67
- </Button>
68
- ]
69
-
70
- const componentMeta: ComponentMeta<typeof SocialBlock> = {
71
- title: 'Trepur Components/Rupert Bennett/Organisms/Social Block',
72
- component: SocialBlock,
73
- parameters: {},
74
- argTypes: {
75
- withLiveUpdates: {
76
- description: '',
77
- control: 'boolean',
78
- table: { category: '' }
79
- },
80
- onSave: {
81
- type: { name: 'function', required: false },
82
- description: 'Fires a function when you click save',
83
- action: 'onClick',
84
- table: {
85
- type: { summary: 'function' },
86
- defaultValue: { summary: 'undefined' }
87
- }
88
- },
89
- theme: {
90
- type: { name: 'string', required: false },
91
- options: ['dark', 'light'],
92
- description: 'The variant of button to render',
93
- table: { type: { summary: 'dark' }, defaultValue: { summary: 'dark' } },
94
- defaultValue: 'dark',
95
- control: { type: 'radio' }
96
- }
97
- },
98
- args: {
99
- title: 'Why not connect with me on LinkedIn or Facebook?',
100
- text: 'Or send me a E-Mail to get in touch',
101
- editTitleClasses: 'text-md sm:text-lg ',
102
- editTextClasses: '',
103
- editInputClasses: 'mt-4 border border-black text-black bg-white',
104
- onSave: action('button-save'),
105
- withLiveUpdates: true,
106
- socialButtons
107
- }
108
- }
109
-
110
- const Template: ComponentStory<typeof SocialBlock> = (args) => <SocialBlock {...args} />
111
-
112
- export const _SocialBlock = Template.bind({})
113
-
114
- export default componentMeta
@@ -1,161 +0,0 @@
1
- import React, { useState } from 'react'
2
- import Input from '@components/Input'
3
- import Button, { Props as buttonProps } from '@components/Button'
4
- import classNames from 'classnames'
5
-
6
- export interface Props {
7
- id?: string
8
- className?: string
9
- title?: string
10
- text?: string
11
- withLiveUpdates?: boolean
12
- onSave?: (arr: any[], id: string | undefined) => void
13
- saveButtonProps?: buttonProps
14
- cancelButtonProps?: buttonProps
15
- editTitleClasses?: string
16
- editTextClasses?: string
17
- editInputClasses?: string
18
- buttonWrapperClasses?: string
19
- textWrapperClasses?: string
20
- socialButtons?: buttonProps[]
21
- theme: 'light' | 'dark'
22
- }
23
-
24
- const SocialBlock = ({
25
- id,
26
- className,
27
- title,
28
- text,
29
- withLiveUpdates,
30
- onSave,
31
- saveButtonProps,
32
- cancelButtonProps,
33
- editTitleClasses,
34
- editTextClasses,
35
- editInputClasses,
36
- buttonWrapperClasses,
37
- textWrapperClasses,
38
- socialButtons,
39
- theme = 'light'
40
- }: Props): JSX.Element => {
41
- const colours = theme === 'dark' ? 'placeholder-white bg-primary text-white' : 'placeholder-primary bg-white text-primary'
42
- const defaultComponentData = {
43
- title: {
44
- text: title
45
- },
46
- text: {
47
- text
48
- }
49
- }
50
-
51
- const [isInEditingMode, setIsInEditingMode] = useState(false)
52
- const [isHovering, setIsHovering] = useState(false)
53
- const [componentData, setComponentData] = useState(defaultComponentData)
54
- const hoverClasses = 'border-dashed border'
55
-
56
- const classList = classNames(className, colours)
57
- const buttnoWrapperClasslist = classNames(buttonWrapperClasses, 'py-4')
58
-
59
- const hoverClassList = classNames({
60
- [hoverClasses]: withLiveUpdates !== undefined && !isInEditingMode && isHovering
61
- }, textWrapperClasses)
62
-
63
- const toggleEditState = (): void => {
64
- withLiveUpdates === true && setIsInEditingMode(!isInEditingMode)
65
- }
66
-
67
- const handleButtonSave = (): void => {
68
- const arr = []
69
- arr.push({ key: 'title', value: componentData.title.text })
70
- arr.push({ key: 'text', value: componentData.text.text })
71
- toggleEditState()
72
- onSave?.(arr, id)
73
- setIsHovering(false)
74
- }
75
-
76
- const handleButtonCancel = (): void => {
77
- toggleEditState()
78
- setIsHovering(false)
79
- }
80
-
81
- const handleChange = (e: any): void => {
82
- let id = e.target.id
83
- id = id.split('-')[id.split('-').length - 1]
84
- setComponentData({
85
- ...componentData,
86
- [id]: {
87
- text: e.target.value
88
- }
89
- })
90
- }
91
-
92
- const toggleHoverState = (): void => {
93
- withLiveUpdates === true && setIsHovering(!isHovering)
94
- }
95
-
96
- return (
97
- <div
98
- id={id}
99
- className={classList}
100
- >
101
- {withLiveUpdates === true && isInEditingMode
102
- ? (
103
- <div className={colours}>
104
- <Input
105
- id='title'
106
- className={editTitleClasses}
107
- inputClasses={editInputClasses}
108
- autoFocus
109
- value={componentData.title.text}
110
- onChange={(e: any) => handleChange(e)}
111
- type='text'
112
- theme={theme}
113
- />
114
- <Input
115
- id='text'
116
- className={editTextClasses}
117
- inputClasses={editInputClasses}
118
- value={componentData.text.text}
119
- onChange={(e: any) => handleChange(e)}
120
- type='text'
121
- theme={theme}
122
- />
123
- <Button
124
- className='mt-4'
125
- onClick={handleButtonSave}
126
- >
127
- Save
128
- </Button>
129
- <Button
130
- className='mt-4 ml-4'
131
- onClick={handleButtonCancel}
132
- >
133
- Cancel
134
- </Button>
135
- </div>
136
- )
137
- : (
138
- <>
139
- <div
140
- onMouseOver={() => toggleHoverState()}
141
- onMouseOut={() => toggleHoverState()}
142
- onClick={toggleEditState}
143
- className={hoverClassList}
144
- >
145
- <h2 className='text-md sm:text-lg'>{componentData.title.text}</h2>
146
- <p className='pt-4'>{componentData.text.text}</p>
147
- </div>
148
- <div className={buttnoWrapperClasslist}>
149
- <div className='flex flex-wrap w-full justify-center'>
150
- {socialButtons?.map((button, i: number) => {
151
- return <div key={`social_btn_${i + 1}`}>{button}</div>
152
- })}
153
- </div>
154
- </div>
155
- </>
156
- )}
157
- </div>
158
- )
159
- }
160
-
161
- export default SocialBlock
@@ -1,23 +0,0 @@
1
- import React from 'react'
2
- import StarRating from './index'
3
- import { idAndClassName } from '@utils/controls'
4
- import { ComponentStory, ComponentMeta } from '@storybook/react'
5
-
6
- const componentMeta: ComponentMeta<typeof StarRating> = {
7
- title: 'Trepur Components/Other/Atoms/Star Rating',
8
- component: StarRating,
9
- parameters: {},
10
- argTypes: {
11
- ...idAndClassName
12
- },
13
- args: {
14
- stars: 3,
15
- size: 2
16
- }
17
- }
18
-
19
- const Template: ComponentStory<typeof StarRating> = (args) => <StarRating {...args} />
20
-
21
- export const _StarRating = Template.bind({})
22
-
23
- export default componentMeta
@@ -1,71 +0,0 @@
1
- import React from 'react'
2
- import Icon from '@components/Icon'
3
- import classNames from 'classnames'
4
-
5
- export interface Props {
6
- id: string
7
- className: string
8
- stars: number
9
- size: number
10
- }
11
- const StarRating = ({
12
- id,
13
- className,
14
- stars = 1,
15
- size = 1
16
- }: Props): JSX.Element => {
17
- const classList = classNames({
18
- }, `${className} flex`)
19
-
20
- const getStars = (): JSX.Element[] => {
21
- const starsArr = []
22
- for (let i = 0; i < stars; i++) {
23
- starsArr.push(
24
- <Icon
25
- key={`checked_star_${i + 0}`}
26
- id={`checked-${i}`}
27
- className='checked'
28
- type='star'
29
- size={size}
30
- colour='gold'
31
- bgColour='white'
32
- />
33
- )
34
- }
35
- return starsArr
36
- }
37
-
38
- const getStarsChecked = (): JSX.Element[] => {
39
- const starsArr = []
40
- for (let i = 0; i < 5 - stars; i++) {
41
- starsArr.push(
42
- <Icon
43
- key={`unchecked_star_${i + 0}`}
44
- id={`unchecked-${i}`}
45
- className='unchecked opacity-30 gold'
46
- type='star'
47
- size={size}
48
- colour='gold'
49
- bgColour='white'
50
- />
51
- )
52
- }
53
- return starsArr
54
- }
55
-
56
- const getAllStars = (): JSX.Element[] => {
57
- const starArray = [...getStars(), ...getStarsChecked()]
58
- return starArray
59
- }
60
-
61
- return (
62
- <div
63
- id={id}
64
- className={classList}
65
- >
66
- {getAllStars()}
67
- </div>
68
- )
69
- }
70
-
71
- export default StarRating
@@ -1,110 +0,0 @@
1
- import React from 'react'
2
- import { idAndClassName } from '@utils/controls'
3
- import Testimonial from './index'
4
- import { ComponentStory, ComponentMeta } from '@storybook/react'
5
-
6
- const componentMeta: ComponentMeta<typeof Testimonial> = {
7
- title: 'Trepur Components/Rupert Bennett/Organisms/Testimonial',
8
- component: Testimonial,
9
- parameters: {},
10
- argTypes: {
11
- ...idAndClassName,
12
- text: {
13
- description: 'The description to display on the component',
14
- control: 'text',
15
- table: {
16
- type: { summary: 'default' }
17
- },
18
- defaultValue: { summary: 'undefined' }
19
- },
20
- companyName: {
21
- description: 'The company name to display on the component',
22
- control: 'text',
23
- table: {
24
- type: { summary: 'default' }
25
- },
26
- defaultValue: { summary: 'undefined' }
27
- },
28
- positionStartDate: {
29
- description: 'The start date to display on the component',
30
- control: 'text',
31
- table: {
32
- type: { summary: 'default' }
33
- },
34
- defaultValue: { summary: 'undefined' }
35
- },
36
- positionEndDate: {
37
- description: 'The end date to display on the component',
38
- control: 'text',
39
- table: {
40
- type: { summary: 'default' }
41
- },
42
- defaultValue: { summary: 'undefined' }
43
- },
44
- position: {
45
- description: 'The position to display on the component',
46
- control: 'text',
47
- table: {
48
- type: { summary: 'default' }
49
- },
50
- defaultValue: { summary: 'undefined' }
51
- },
52
- date: {
53
- description: 'The date of the testimonial to display on the component',
54
- control: 'text',
55
- table: {
56
- type: { summary: 'default' }
57
- },
58
- defaultValue: { summary: 'undefined' }
59
- },
60
- authorsName: {
61
- description: 'The authors name to display on the component',
62
- control: 'text',
63
- table: {
64
- type: { summary: 'default' }
65
- },
66
- defaultValue: { summary: 'undefined' }
67
- },
68
- authorsPosition: {
69
- description: 'The authors position to display on the component',
70
- control: 'text',
71
- table: {
72
- type: { summary: 'default' }
73
- },
74
- defaultValue: { summary: 'undefined' }
75
- },
76
- imageProps: {
77
- type: { name: 'other', value: 'object' },
78
- description: 'The props to pass to the image to display on the component',
79
- table: {
80
- type: {
81
- summary: 'object'
82
- },
83
- defaultValue: { summary: 'undefined' }
84
- }
85
- }
86
- },
87
- args: {
88
- imageProps: {
89
- image: 'https://picsum.photos/100/100',
90
- height: 8,
91
- width: 8,
92
- roundedFull: true,
93
- centerAligned: true
94
- },
95
- authorsName: 'Authors Name',
96
- authorsPosition: 'Authors Position',
97
- position: 'Position',
98
- positionEndDate: 'End Date',
99
- positionStartDate: 'Start Date',
100
- date: 'Date',
101
- companyName: 'Company Name',
102
- text: 'This is some text'
103
- }
104
- }
105
-
106
- const Template: ComponentStory<typeof Testimonial> = (args) => <Testimonial {...args} />
107
-
108
- export const _Testimonial = Template.bind({})
109
-
110
- export default componentMeta
@@ -1,50 +0,0 @@
1
- import React from 'react'
2
- import classNames from 'classnames'
3
- import Image, { Props as imageProps } from '@components/Image'
4
-
5
- export interface Props {
6
- id?: string
7
- className?: string
8
- text?: string
9
- imageProps?: imageProps
10
- companyName?: string
11
- position?: string
12
- date?: string
13
- positionStartDate?: string
14
- positionEndDate?: string
15
- authorsName?: string
16
- authorsPosition?: string
17
- }
18
-
19
- const Testimonial = ({
20
- id,
21
- className,
22
- text,
23
- imageProps,
24
- companyName,
25
- position,
26
- date,
27
- positionStartDate,
28
- positionEndDate,
29
- authorsName,
30
- authorsPosition
31
- }: Props): JSX.Element => {
32
- const classList = classNames(className, 'text-center')
33
-
34
- return (
35
- <div id={id} className={classList}>
36
- <div className='mx-auto'>
37
- <Image {...imageProps} />
38
- </div>
39
- <div>
40
- <h2 className='text-md md:text-md'>{companyName} </h2>
41
- <p className='text-md md:text-sm'>{position}</p>
42
- <p>{positionStartDate} - {positionEndDate}</p>
43
- <p>{text}</p>
44
- <p>{authorsName} - {authorsPosition}: {date}</p>
45
- </div>
46
- </div>
47
- )
48
- }
49
-
50
- export default Testimonial