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 z-[9] flex h-10 -translate-x-1/2 items-center rounded-xl border border-components-panel-border bg-components-panel-bg-blur p-2 shadow-md'>
  14. <div
  15. className='absolute inset-0 rounded-xl opacity-[0.4]'
  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 h-5 w-5 items-center justify-center'>
  21. <RiAlertFill className='h-4 w-4 text-text-warning-secondary' />
  22. </div>
  23. <div className='system-xs-medium mx-1 px-1 text-text-primary'>
  24. {showTips}
  25. </div>
  26. <ActionButton
  27. className='z-[1]'
  28. onClick={() => setShowTips('')}
  29. >
  30. <RiCloseLine className='h-4 w-4' />
  31. </ActionButton>
  32. </div>
  33. )
  34. }
  35. export default LimitTips