mirror of
https://github.com/morten-olsen/react-native-debug-console.git
synced 2026-02-08 00:36:26 +01:00
Added storage view, and updated the UI in general
This commit is contained in:
41
lib/src/components/DevTool/Storage/Keys.js
Normal file
41
lib/src/components/DevTool/Storage/Keys.js
Normal file
@@ -0,0 +1,41 @@
|
||||
import React from 'react';
|
||||
import styled from 'styled-components/native';
|
||||
import Row from '../../base/Row';
|
||||
import {
|
||||
Body,
|
||||
} from '../../base/text';
|
||||
|
||||
const Scroll = styled.ScrollView`
|
||||
flex: 1;
|
||||
`;
|
||||
|
||||
const Wrapper = styled.View`
|
||||
`;
|
||||
|
||||
const Button = styled.TouchableOpacity`
|
||||
`;
|
||||
|
||||
const Keys = ({
|
||||
keys,
|
||||
selected,
|
||||
onSelect,
|
||||
}) => (
|
||||
<Scroll>
|
||||
<Wrapper>
|
||||
{keys.map(key => (
|
||||
<Button
|
||||
key={key}
|
||||
onPress={() => onSelect(key)}
|
||||
>
|
||||
<Row
|
||||
selected={selected === key}
|
||||
>
|
||||
<Body>{key}</Body>
|
||||
</Row>
|
||||
</Button>
|
||||
))}
|
||||
</Wrapper>
|
||||
</Scroll>
|
||||
)
|
||||
|
||||
export default Keys;
|
||||
Reference in New Issue
Block a user