index.tsx 595 B

12345678910111213
  1. import { Image } from '@tarojs/components'
  2. import ArrowVerticalFilledWhite from '@/images/svgs/chat/ArrowVerticalFilledWhite.svg'
  3. import ArrowVerticalFilledGray from '@/images/svgs/chat/ArrowVerticalFilledGray.svg'
  4. interface IProps {
  5. color?: 'white' | 'gray'
  6. rotation?: number
  7. }
  8. export default ({color, rotation = 0}: IProps) => {
  9. const Icon = color === 'white' ? ArrowVerticalFilledWhite : ArrowVerticalFilledGray
  10. return (
  11. <Image src={Icon} mode="widthFix" style={{width: '16px', height: '16px', transition: 'transform .1s .1s', transform: `rotate(${rotation}deg)`}}></Image>
  12. )
  13. }