File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ class ColorSwatch extends PureComponent<Props> {
137
137
const { isSelected} = this . state ;
138
138
const Container = onPress ? TouchableOpacity : View ;
139
139
const tintColor = this . getTintColor ( color ) ;
140
+ const accessibilityInfo = Constants . accessibility . isScreenReaderEnabled && this . getAccessibilityInfo ( ) ;
140
141
141
142
return (
142
143
< Container
@@ -148,7 +149,7 @@ class ColorSwatch extends PureComponent<Props> {
148
149
onPress = { this . onPress }
149
150
style = { [ this . styles . container , style ] }
150
151
onLayout = { this . onLayout }
151
- { ...this . getAccessibilityInfo ( ) }
152
+ { ...accessibilityInfo }
152
153
>
153
154
{ Colors . isTransparent ( color ) && (
154
155
< Image source = { transparentImage } style = { this . styles . transparentImage } resizeMode = { 'cover' } />
Original file line number Diff line number Diff line change 1
1
// adopted from: ntc js (Name that Color JavaScript)
2
2
// http://chir.ag/projects/ntc
3
+ // TODO: change array to object to improve performance
3
4
4
5
const colorNameMap = [
5
6
[ '000000' , 'Black' ] ,
You can’t perform that action at this time.
0 commit comments