mirror of
https://github.com/balzack/databag.git
synced 2025-04-24 02:25:26 +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',
|
||||
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>}
|
||||
<Text numberOfLines={1} style={styles.handle}>{node ? `${handle}/${node}` : handle}</Text>
|
||||
</View>
|
||||
<View>
|
||||
<View style={styles.actions}>
|
||||
{actions}
|
||||
</View>
|
||||
</SafeAreaView>
|
||||
|
@ -149,6 +149,9 @@ export const styles = StyleSheet.create({
|
||||
transform: [{scaleX: 0.7}, {scaleY: 0.7}],
|
||||
flexGrow: 1,
|
||||
},
|
||||
memberSwitch: {
|
||||
transform: [{scaleX: 0.7}, {scaleY: 0.7}],
|
||||
},
|
||||
addControls: {
|
||||
display: 'flex',
|
||||
flexDirection: 'row',
|
||||
@ -186,7 +189,7 @@ export const styles = StyleSheet.create({
|
||||
paddingVertical: 6,
|
||||
},
|
||||
members: {
|
||||
height: 256,
|
||||
height: 200,
|
||||
},
|
||||
membersContainer: {
|
||||
},
|
||||
|
@ -155,7 +155,7 @@ export function Content({select}: {select: (focus: Focus) => void}) {
|
||||
data={cards}
|
||||
initialNumToRender={32}
|
||||
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) {
|
||||
setMembers([ item.cardId, ...members ]);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user