-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into salim/bump-network-co…
…ntroller-21.0.0
- Loading branch information
Showing
66 changed files
with
1,553 additions
and
598 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 0 additions & 51 deletions
51
...omponents/UI/BasicFunctionality/BasicFunctionalityModal/BasicFunctionalityModal.styles.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react-native'; | ||
import { StyleProp, Text, TextStyle, View } from 'react-native'; | ||
|
||
import InfoRow from './InfoRow'; | ||
import InfoSection from './InfoSection'; | ||
|
||
const style = { | ||
container: { padding: 8 }, | ||
title: { marginTop: 20, fontSize: 20, fontWeight: '700' }, | ||
}; | ||
|
||
storiesOf('App Components / InfoRow', module) | ||
.addDecorator((getStory) => getStory()) | ||
.add('Default', () => ( | ||
<View style={style.container}> | ||
<Text style={style.title as StyleProp<TextStyle>}>Simple Info Row</Text> | ||
<InfoSection> | ||
<InfoRow label="label-Key">Value-Text</InfoRow> | ||
</InfoSection> | ||
<Text style={style.title as StyleProp<TextStyle>}>Value wrapped</Text> | ||
<InfoSection> | ||
<InfoRow label="label-Key"> | ||
Value-Text Value-Text Value-Text Value-Text Value-Text Value-Text | ||
Value-Text Value-Text Value-Text Value-Text Value-Text Value-Text | ||
Value-Text Value-Text Value-Text Value-Text | ||
</InfoRow> | ||
</InfoSection> | ||
</View> | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react'; | ||
import { render } from '@testing-library/react-native'; | ||
|
||
import InfoRow from './index'; | ||
|
||
describe('InfoRow', () => { | ||
it('should match snapshot for simple text value', async () => { | ||
const container = render(<InfoRow label="label-Key">Value-Text</InfoRow>); | ||
expect(container).toMatchSnapshot(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from 'react'; | ||
import { Text, View } from 'react-native'; | ||
|
||
import { useTheme } from '../../../util/theme'; | ||
import createStyles from './style'; | ||
|
||
interface InfoRowProps { | ||
label: string; | ||
children: React.ReactNode | string; | ||
tooltip?: string; | ||
} | ||
|
||
const InfoRow = ({ label, children }: InfoRowProps) => { | ||
const { colors } = useTheme(); | ||
|
||
const styles = createStyles(colors); | ||
|
||
return ( | ||
<View style={styles.container}> | ||
<Text style={styles.label}>{label}</Text> | ||
{typeof children === 'string' ? ( | ||
<Text style={styles.value}>{children}</Text> | ||
) : ( | ||
children | ||
)} | ||
</View> | ||
); | ||
}; | ||
|
||
export default InfoRow; |
18 changes: 18 additions & 0 deletions
18
app/components/UI/InfoRow/InfoSection/InfoSection.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react'; | ||
import { Text, View } from 'react-native'; | ||
import { render } from '@testing-library/react-native'; | ||
|
||
import InfoSection from './index'; | ||
|
||
describe('InfoSection', () => { | ||
it('should match snapshot for simple text value', async () => { | ||
const container = render( | ||
<InfoSection> | ||
<View> | ||
<Text>Test</Text> | ||
</View> | ||
</InfoSection>, | ||
); | ||
expect(container).toMatchSnapshot(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react'; | ||
import { View } from 'react-native'; | ||
|
||
import { useTheme } from '../../../../util/theme'; | ||
import createStyles from './style'; | ||
|
||
interface InfoSectionProps { | ||
children: React.ReactNode | string; | ||
} | ||
|
||
const InfoSection = ({ children }: InfoSectionProps) => { | ||
const { colors } = useTheme(); | ||
const styles = createStyles(colors); | ||
|
||
return <View style={styles.container}>{children}</View>; | ||
}; | ||
|
||
export default InfoSection; |
Oops, something went wrong.