File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,12 @@ const {some, last} = require('lodash')
6
6
const excludedComponents = new Set ( [ 'Box' , 'Text' ] )
7
7
8
8
// Components for which we allow a set of prop names
9
- const excludedComponentProps = new Map ( [ [ 'ProgressBar' , new Set ( [ 'bg' ] ) ] ] )
9
+ const excludedComponentProps = new Map ( [
10
+ [ 'Avatar' , new Set ( [ 'size' ] ) ] ,
11
+ [ 'Label' , new Set ( [ 'variant' ] ) ] ,
12
+ [ 'ProgressBar' , new Set ( [ 'bg' ] ) ] ,
13
+ [ 'Spinner' , new Set ( [ 'size' ] ) ]
14
+ ] )
10
15
11
16
module . exports = {
12
17
meta : {
@@ -100,7 +105,12 @@ const objectEntriesStringFromStylesMap = styles => {
100
105
101
106
// Given an array of styled prop attributes, return a mapping from attribute to expression
102
107
const stylesMapFromPropNodes = ( badProps , context ) => {
103
- return new Map ( badProps . map ( a => [ a . name . name , a . value . raw || context . getSourceCode ( ) . getText ( a . value . expression ) ] ) )
108
+ return new Map (
109
+ badProps . map ( a => [
110
+ a . name . name ,
111
+ a . value === null ? 'true' : a . value . raw || context . getSourceCode ( ) . getText ( a . value . expression )
112
+ ] )
113
+ )
104
114
}
105
115
106
116
// Given a style map and an existing sx prop, return a style map containing
You can’t perform that action at this time.
0 commit comments