第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

react-native 紙質按鈕矢量圖標向右浮動

react-native 紙質按鈕矢量圖標向右浮動

30秒到達戰(zhàn)場 2022-11-11 16:50:55
我嘗試使用 V 形圖標構建一個手風琴菜單,我的 headerbutton 具有以下代碼:const AccordeonHeader = (Props) => {        return(            <View style={[accordionStyles.header]}>                    <Button                        contentStyle={[accordionStyles.header__button, ]}                        color='black'                        onPress={() => {show !== Props.value ? setShow(Props.value) : setShow(false)}}                    >                           <Text                            style={[accordionStyles.header__text, styles.headline__h2]}                        >                            {Props.label}                        </Text>                                                    <Icon                             iconStyle={[accordionStyles.header__icon,]}                             name={show === Props.value ? "chevron-up" : "chevron-down"}                        >                        </Icon>                                                                 </Button>                </View>        );    }用這種風格const accordionStyles = StyleSheet.create({    header: {    },    header__button: {        width:'100%',        borderColor:'green',        borderWidth:2,        flexDirection:'row',        justifyContent:'space-between',    },    header__text: {        display:'none',        color:'black',    },    header__icon: {        alignSelf:'flex-end',        color:'black',    },     });但我無法獲得右側的圖標,而文字留在左側。它總是直接在旁邊。
查看完整描述

1 回答

?
PIPIONE

TA貢獻1829條經(jīng)驗 獲得超9個贊

更新


import * as React from 'react';

import { Text, View, StyleSheet ,Button,TouchableOpacity} from 'react-native';

import Constants from 'expo-constants';

import FontAwesome from "react-native-vector-icons/FontAwesome";


export default function App() {

  return (

    <TouchableOpacity style={[accordionStyles.header]} onPress={()=>console.log("press")}>        

          <Text style={{paddingTop:5}}>Sortieren</Text>

          <FontAwesome

            iconStyle={[accordionStyles.header__icon]}

            size={30}

            color="#000000" 

            name={"chevron-up"}

          />        

      </TouchableOpacity>

  );

}


const accordionStyles = StyleSheet.create({

  header: { 

    width: "100%",

  borderColor: "green",

  borderWidth: 2,

  flexDirection: "row",

  justifyContent: "space-between"},  

  header__icon: {

    alignSelf: "flex-end",

    color: "black"

  }

});

http://img1.sycdn.imooc.com//636e0d190001637304090049.jpg

零食代碼


查看完整回答
反對 回復 2022-11-11
  • 1 回答
  • 0 關注
  • 170 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號