limit-tips.tsx 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import {
  2. RiAlertFill,
  3. RiCloseLine,
  4. } from '@remixicon/react'
  5. import { useStore } from './store'
  6. import ActionButton from '@/app/components/base/action-button'
  7. const LimitTips = () => {
  8. const showTips = useStore(s => s.showTips)
  9. const setShowTips = useStore(s => s.setShowTips)
  10. if (!showTips)
  11. return null
  12. return (
  13. <div className='absolute bottom-16 left-1/2 -translate-x-1/2 flex items-center rounded-xl p-2 h-10 border border-components-panel-border bg-components-panel-bg-blur shadow-md z-[9]'>
  14. <div
  15. className='absolute inset-0 opacity-[0.4] rounded-xl'
  16. style={{
  17. background: 'linear-gradient(92deg, rgba(247, 144, 9, 0.25) 0%, rgba(255, 255, 255, 0.00) 100%)',
  18. }}
  19. ></div>
  20. <div className='flex items-center justify-center w-5 h-5'>
  21. <RiAlertFill className='w-4 h-4 text-text-warning-secondary' />
  22. </div>
  23. <div className='mx-1 px-1 system-xs-medium text-text-primary'>
  24. {showTips}
  25. </div>
  26. <ActionButton
  27. className='z-[1]'
  28. onClick={() => setShowTips('')}
  29. >
  30. <RiCloseLine className='w-4 h-4' />
  31. </ActionButton>
  32. </div>
  33. )
  34. }
  35. export default LimitTips