mirror of
https://github.com/balzack/databag.git
synced 2025-05-04 07:25:15 +00:00
fix card list layout
This commit is contained in:
parent
43daaabcb1
commit
e41d1faad7
@ -60,4 +60,9 @@ export const styles = StyleSheet.create({
|
|||||||
overflow: 'hidden',
|
overflow: 'hidden',
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
},
|
},
|
||||||
|
actions: {
|
||||||
|
display: 'flex',
|
||||||
|
flexDirection: 'row',
|
||||||
|
flexShrink: 0,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
@ -31,7 +31,7 @@ export function Card({
|
|||||||
{!name && <Text numberOfLines={1} style={styles.nameUnset}>{placeholder}</Text>}
|
{!name && <Text numberOfLines={1} style={styles.nameUnset}>{placeholder}</Text>}
|
||||||
<Text numberOfLines={1} style={styles.handle}>{node ? `${handle}/${node}` : handle}</Text>
|
<Text numberOfLines={1} style={styles.handle}>{node ? `${handle}/${node}` : handle}</Text>
|
||||||
</View>
|
</View>
|
||||||
<View>
|
<View style={styles.actions}>
|
||||||
{actions}
|
{actions}
|
||||||
</View>
|
</View>
|
||||||
</SafeAreaView>
|
</SafeAreaView>
|
||||||
|
@ -149,6 +149,9 @@ export const styles = StyleSheet.create({
|
|||||||
transform: [{scaleX: 0.7}, {scaleY: 0.7}],
|
transform: [{scaleX: 0.7}, {scaleY: 0.7}],
|
||||||
flexGrow: 1,
|
flexGrow: 1,
|
||||||
},
|
},
|
||||||
|
memberSwitch: {
|
||||||
|
transform: [{scaleX: 0.7}, {scaleY: 0.7}],
|
||||||
|
},
|
||||||
addControls: {
|
addControls: {
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
@ -186,7 +189,7 @@ export const styles = StyleSheet.create({
|
|||||||
paddingVertical: 6,
|
paddingVertical: 6,
|
||||||
},
|
},
|
||||||
members: {
|
members: {
|
||||||
height: 256,
|
height: 200,
|
||||||
},
|
},
|
||||||
membersContainer: {
|
membersContainer: {
|
||||||
},
|
},
|
||||||
|
@ -155,7 +155,7 @@ export function Content({select}: {select: (focus: Focus) => void}) {
|
|||||||
data={cards}
|
data={cards}
|
||||||
initialNumToRender={32}
|
initialNumToRender={32}
|
||||||
renderItem={({item}) => {
|
renderItem={({item}) => {
|
||||||
const enable = (<Switch key="enable" style={styles.sealSwitch} value={Boolean(members.find(cardId => cardId === item.cardId))} onValueChange={flag => {
|
const enable = (<Switch key="enable" style={styles.memberSwitch} value={Boolean(members.find(cardId => cardId === item.cardId))} onValueChange={flag => {
|
||||||
if (flag) {
|
if (flag) {
|
||||||
setMembers([ item.cardId, ...members ]);
|
setMembers([ item.cardId, ...members ]);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user