@@ -4,16 +4,14 @@ import colors from '@/ui/colors';
44import { Title } from './title' ;
55type ColorName = keyof typeof colors ;
66
7- export const Colors = ( ) => {
8- return (
7+ export const Colors = ( ) => (
98 < >
109 < Title text = "Colors" />
1110 { ( Object . keys ( colors ) as ColorName [ ] ) . map ( ( name ) => (
1211 < Color name = { name } key = { name } />
1312 ) ) }
1413 </ >
1514 ) ;
16- } ;
1715
1816const Color = ( { name } : { name : ColorName } ) => {
1917 if ( typeof colors [ name ] === 'string' ) {
@@ -23,22 +21,19 @@ const Color = ({ name }: { name: ColorName }) => {
2321 < View className = "pt-2" testID = { `color-list-${ name } ` } >
2422 < Text className = "font-medium" > { name . toUpperCase ( ) } </ Text >
2523 < View className = "flex-row flex-wrap content-between justify-around " >
26- { Object . entries ( colors [ name ] ) . map ( ( [ key , value ] ) => {
27- return (
24+ { Object . entries ( colors [ name ] ) . map ( ( [ key , value ] ) => (
2825 < ColorCard
2926 key = { `${ colors [ name ] } -${ key } ` }
3027 value = { key }
3128 color = { value }
3229 />
33- ) ;
34- } ) }
30+ ) ) }
3531 </ View >
3632 </ View >
3733 ) ;
3834} ;
3935
40- const ColorCard = ( { color, value } : { value : string ; color : string } ) => {
41- return (
36+ const ColorCard = ( { color, value } : { value : string ; color : string } ) => (
4237 < View className = "flex-1" >
4338 < View
4439 className = "h-14 w-full rounded-sm"
@@ -47,4 +42,3 @@ const ColorCard = ({ color, value }: { value: string; color: string }) => {
4742 < Text className = "text-sm" > { value } </ Text >
4843 </ View >
4944 ) ;
50- } ;
0 commit comments