import {View} from '@tarojs/components';
import {Button} from '@nutui/nutui-react-taro'

function FixedButton({text, onClick, icon}) {
  return (
    <>
      {/* 底部安全区域占位 */
      }
      <View className="h-20 w-full"></View>
      <View
        className="fixed z-50 bottom-0 left-0 right-0 bg-white border-t border-gray-200 px-4 py-3 safe-area-bottom">
        <Button
          type="success"
          size="large"
          block
          icon={icon}
          className="px-6"
          onClick={onClick}>
          {text || '新增'}
        </Button>
      </View>
    </>
  )
}

export default FixedButton;
