Skip to content

Commit ba584a8

Browse files
committed
♻️ Extend Box with propTypes
1 parent ab11f34 commit ba584a8

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

src/box/index.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import styled from '@emotion/styled'
2-
import PropTypes from 'prop-types'
32

43
import {
54
combineStyles,
@@ -47,8 +46,7 @@ Box.displayName = 'Box'
4746

4847
Box.propTypes = {
4948
...BoxBase.propTypes,
50-
...styles.propTypes,
51-
initialCSS: PropTypes.object
49+
...styles.propTypes
5250
}
5351

5452
export {

src/flex/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const Flex = styled(Box)(
2424
)
2525

2626
Flex.displayName = 'Flex'
27-
Flex.propTypes = { ...styles.propTypes }
27+
Flex.propTypes = { ...styles.propTypes, ...Box.propTypes }
2828
Flex.defaultProps = { display: 'flex' }
2929

3030
export {

src/grid/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ const Grid = styled(Box)(
3131
)
3232

3333
Grid.displayName = 'Grid'
34-
Grid.propTypes = { ...styles.propTypes }
34+
Grid.propTypes = { ...styles.propTypes, ...Box.propTypes }
3535
Grid.defaultProps = { display: 'grid' }
3636

3737
const GridItem = styled(Box)(
3838
gridItem
3939
)
4040

4141
GridItem.displayName = 'Grid.Item'
42-
GridItem.propTypes = { ...gridItem.propTypes }
42+
GridItem.propTypes = { ...gridItem.propTypes, ...Box.propTypes }
4343
Grid.Item = GridItem
4444

4545
export {

src/text/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const Text = styled(TextBase)(
2222
)
2323

2424
Text.displayName = 'Text'
25-
Text.propTypes = { ...styles.propTypes }
25+
Text.propTypes = { ...styles.propTypes, ...Box.propTypes }
2626

2727
export {
2828
Text

0 commit comments

Comments
 (0)