Skip to content

Commit 9fea6dd

Browse files
committed
Remove prop-types
Signed-off-by: Leonardo Rossi <[email protected]>
1 parent add29a9 commit 9fea6dd

File tree

271 files changed

+13
-6324
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+13
-6324
lines changed

src/components/BorderedBox.jsx

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { useEffect, useState } from 'react'
2-
import PropTypes from 'prop-types'
32
import styles from './BorderedBox.module.css'
43
import commonStyles from './Common.module.css'
54
import { COLORS_BORDERED_BOX, DARK_BLUE, TRANSPARENT, OPACITIES, OPACITY_100 } from './constants'
@@ -60,39 +59,4 @@ function BorderedBox (props) {
6059
)
6160
}
6261

63-
BorderedBox.propTypes = {
64-
/**
65-
* children
66-
*/
67-
children: PropTypes.node,
68-
/**
69-
* color of text, icon and borders
70-
*/
71-
color: PropTypes.oneOf(COLORS_BORDERED_BOX),
72-
/**
73-
* background color of the button
74-
*/
75-
backgroundColor: PropTypes.oneOf(COLORS_BORDERED_BOX),
76-
/**
77-
* classes
78-
*/
79-
classes: PropTypes.string,
80-
/**
81-
* backgroundColorOpacity
82-
*/
83-
backgroundColorOpacity: PropTypes.oneOf(OPACITIES),
84-
/**
85-
* borderColorOpacity
86-
*/
87-
borderColorOpacity: PropTypes.oneOf(OPACITIES),
88-
/**
89-
* clickable
90-
*/
91-
clickable: PropTypes.bool,
92-
/**
93-
* onClick
94-
*/
95-
onClick: PropTypes.func
96-
}
97-
9862
export default BorderedBox

src/components/Button.jsx

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { useEffect, useState } from 'react'
2-
import PropTypes from 'prop-types'
32
import styles from './Button.module.css'
43
import commonStyles from './Common.module.css'
54
import PlatformaticIcon from './PlatformaticIcon'
@@ -122,71 +121,4 @@ function Button ({
122121
)
123122
}
124123

125-
Button.propTypes = {
126-
/**
127-
* textClass
128-
*/
129-
textClass: PropTypes.string,
130-
/**
131-
* paddingClass
132-
*/
133-
paddingClass: PropTypes.string,
134-
/**
135-
* label
136-
*/
137-
label: PropTypes.string,
138-
/**
139-
* color of text, icon and borders
140-
*/
141-
color: PropTypes.oneOf(COLORS_BUTTON),
142-
/**
143-
* background color of the button
144-
*/
145-
backgroundColor: PropTypes.oneOf(COLORS_BUTTON),
146-
/**
147-
* Size
148-
*/
149-
size: PropTypes.oneOf(SIZES),
150-
/**
151-
* Disabled
152-
*/
153-
disabled: PropTypes.bool,
154-
/**
155-
* Effect on hover
156-
*/
157-
hoverEffect: PropTypes.oneOf(HOVER_EFFECTS_BUTTONS),
158-
/**
159-
* Hover effect properties
160-
*/
161-
hoverEffectProperties: PropTypes.shape({
162-
changeBackgroundColor: PropTypes.oneOf(BUTTON_BACKGROUNDS_COLOR_HOVER)
163-
}),
164-
/**
165-
* Apply border: default true
166-
*/
167-
bordered: PropTypes.bool,
168-
/**
169-
* Full Width: default false
170-
*/
171-
fullWidth: PropTypes.bool,
172-
/**
173-
* platformaticIcon: should be removed
174-
*/
175-
platformaticIcon: PropTypes.shape({
176-
iconName: PropTypes.string,
177-
color: PropTypes.string
178-
}),
179-
/**
180-
* platformaticIconAfter: should be removed
181-
*/
182-
platformaticIconAfter: PropTypes.shape({
183-
iconName: PropTypes.string,
184-
color: PropTypes.string
185-
}),
186-
/**
187-
* Selected: default false
188-
*/
189-
selected: PropTypes.bool
190-
}
191-
192124
export default Button
Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from 'react'
2-
import PropTypes from 'prop-types'
32
import commonStyles from './Common.module.css'
43
import styles from './ButtonFullRounded.module.css'
54
import PlatformaticIcon from './PlatformaticIcon'
@@ -49,59 +48,4 @@ function ButtonFullRounded ({
4948
)
5049
}
5150

52-
ButtonFullRounded.propTypes = {
53-
/**
54-
* iconName
55-
*/
56-
iconName: PropTypes.string,
57-
/**
58-
* iconColor
59-
*/
60-
iconColor: PropTypes.oneOf(COLORS_ICON),
61-
/**
62-
* iconColor
63-
*/
64-
iconSize: PropTypes.oneOf(SIZES),
65-
/**
66-
* disabled
67-
*/
68-
disabled: PropTypes.bool,
69-
/**
70-
* paddingSize
71-
*/
72-
paddingSize: PropTypes.oneOf(PADDING_SIZES),
73-
/**
74-
* alt
75-
*/
76-
alt: PropTypes.string,
77-
/**
78-
* onClick
79-
*/
80-
onClick: PropTypes.func,
81-
/**
82-
* Effect on hover
83-
*/
84-
hoverEffect: PropTypes.oneOf(['', DULLS_BACKGROUND_COLOR]),
85-
/**
86-
* bordered
87-
*/
88-
bordered: PropTypes.bool,
89-
/**
90-
* tip
91-
*/
92-
tip: PropTypes.string,
93-
/**
94-
* Selected: default false
95-
*/
96-
selected: PropTypes.bool,
97-
/**
98-
* buttonClassName
99-
*/
100-
buttonClassName: PropTypes.string,
101-
/**
102-
* internalOverHandling
103-
*/
104-
internalOverHandling: PropTypes.bool
105-
}
106-
10751
export default ButtonFullRounded

src/components/ButtonOnlyIcon.jsx

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { useEffect, useState } from 'react'
2-
import PropTypes from 'prop-types'
32
import styles from './ButtonOnlyIcon.module.css'
43
import commonStyles from './Common.module.css'
54
import PlatformaticIcon from './PlatformaticIcon'
@@ -94,59 +93,4 @@ function ButtonOnlyIcon ({
9493
)
9594
}
9695

97-
ButtonOnlyIcon.propTypes = {
98-
/**
99-
* textClass
100-
*/
101-
textClass: PropTypes.string,
102-
/**
103-
* paddingClass
104-
*/
105-
paddingClass: PropTypes.string,
106-
/**
107-
* altLabel
108-
*/
109-
altLabel: PropTypes.string,
110-
/**
111-
* color of text, icon and borders
112-
*/
113-
color: PropTypes.oneOf(COLORS_BUTTON),
114-
/**
115-
* background color of the button
116-
*/
117-
backgroundColor: PropTypes.oneOf(COLORS_BUTTON),
118-
/**
119-
* Size
120-
*/
121-
size: PropTypes.oneOf(SIZES),
122-
/**
123-
* Disabled
124-
*/
125-
disabled: PropTypes.bool,
126-
/**
127-
* Effect on hover
128-
*/
129-
hoverEffect: PropTypes.oneOf(HOVER_EFFECTS_BUTTONS),
130-
/**
131-
* Apply border: default true
132-
*/
133-
bordered: PropTypes.bool,
134-
/**
135-
* Full Width: default false
136-
*/
137-
fullWidth: PropTypes.bool,
138-
/**
139-
* platformaticIcon: should be removed
140-
*/
141-
platformaticIcon: PropTypes.shape({
142-
iconName: PropTypes.string,
143-
color: PropTypes.string,
144-
size: PropTypes.string
145-
}),
146-
/**
147-
* Selected: default false
148-
*/
149-
selected: PropTypes.bool
150-
}
151-
15296
export default ButtonOnlyIcon

src/components/Checkbox.jsx

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from 'react'
2-
import PropTypes from 'prop-types'
32
import styles from './Checkbox.module.css'
43
import { MAIN_DARK_BLUE, MEDIUM, RICH_BLACK, SMALL, WHITE } from './constants'
54
function Checkbox ({
@@ -17,19 +16,4 @@ function Checkbox ({
1716
)
1817
}
1918

20-
Checkbox.propTypes = {
21-
/**
22-
* disabled
23-
*/
24-
disabled: PropTypes.bool,
25-
/**
26-
* color
27-
*/
28-
color: PropTypes.oneOf([WHITE, MAIN_DARK_BLUE, RICH_BLACK]),
29-
/**
30-
* size
31-
*/
32-
size: PropTypes.oneOf([SMALL, MEDIUM])
33-
}
34-
3519
export default Checkbox

src/components/CopyAndPaste.jsx

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { useState } from 'react'
2-
import PropTypes from 'prop-types'
32
import { COLORS_ICON, DIRECTION_TOP, MEDIUM, SIZES, POSITIONS, POSITION_CENTER, MAIN_DARK_BLUE } from './constants'
43
import PlatformaticIcon from './PlatformaticIcon'
54
import TooltipAbsolute from './TooltipAbsolute'
@@ -74,43 +73,4 @@ function CopyAndPaste ({
7473
return renderTooltip()
7574
}
7675

77-
CopyAndPaste.propTypes = {
78-
/**
79-
* value
80-
*/
81-
value: PropTypes.string,
82-
/**
83-
* tooltipLabel
84-
*/
85-
tooltipLabel: PropTypes.string,
86-
/**
87-
* size
88-
*/
89-
size: PropTypes.oneOf(SIZES),
90-
/**
91-
* color
92-
*/
93-
color: PropTypes.oneOf(COLORS_ICON),
94-
/**
95-
* timeout
96-
*/
97-
timeout: PropTypes.number,
98-
/**
99-
* internalOverHandling
100-
*/
101-
internalOverHandling: PropTypes.bool,
102-
/**
103-
* timeout
104-
*/
105-
tooltipClassName: PropTypes.string,
106-
/**
107-
* position
108-
*/
109-
position: PropTypes.oneOf(POSITIONS),
110-
/**
111-
* tooltipFixed
112-
*/
113-
tooltipFixed: PropTypes.bool
114-
}
115-
11676
export default CopyAndPaste

src/components/DropDown.jsx

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React, { useEffect, useRef, useState } from 'react'
2-
import PropTypes from 'prop-types'
32
import styles from './DropDown.module.css'
43
import commonStyles from './Common.module.css'
54
import PlatformaticIcon from './PlatformaticIcon'
65
import { DARK_BLUE, LIGHT_BLUE, MAIN_DARK_BLUE, RICH_BLACK, WHITE } from './constants'
6+
77
function DropDown ({
88
pictureUrl = '',
99
header = '',
@@ -89,55 +89,4 @@ function DropDown ({
8989
)
9090
}
9191

92-
DropDown.propTypes = {
93-
/**
94-
* pictureUrl
95-
*/
96-
pictureUrl: PropTypes.string,
97-
/**
98-
* header
99-
*/
100-
header: PropTypes.string,
101-
/**
102-
* headerClassName
103-
*/
104-
headerClassName: PropTypes.string,
105-
/**
106-
* align
107-
*/
108-
align: PropTypes.string,
109-
/**
110-
* items
111-
*/
112-
items: PropTypes.array,
113-
/**
114-
* backgroundColor
115-
*/
116-
backgroundColor: PropTypes.oneOf([DARK_BLUE, LIGHT_BLUE, RICH_BLACK]),
117-
/**
118-
* textColor
119-
*/
120-
textColor: PropTypes.oneOf([MAIN_DARK_BLUE, LIGHT_BLUE, WHITE]),
121-
/**
122-
* borderColor
123-
*/
124-
borderColor: PropTypes.oneOf([MAIN_DARK_BLUE, WHITE, RICH_BLACK]),
125-
/**
126-
* headerColor
127-
*/
128-
headerColor: PropTypes.oneOf([MAIN_DARK_BLUE, WHITE, RICH_BLACK]),
129-
/**
130-
* lastButton
131-
*/
132-
lastButton: PropTypes.node,
133-
/**
134-
* menuCustomClassName
135-
*/
136-
menuCustomClassName: PropTypes.string,
137-
/**
138-
* handleClickOutside
139-
*/
140-
handleClickOutside: PropTypes.bool
141-
}
142-
14392
export default DropDown

0 commit comments

Comments
 (0)