You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
594 B

  1. export default function MineSegment({
  2. tabIndex,
  3. setTabIndex,
  4. }: {
  5. tabIndex: number;
  6. setTabIndex: (idx: number) => void;
  7. }) {
  8. return (
  9. <section className="px-4 py-5 flex">
  10. <div
  11. className={`flex-1 h-10 rounded-l-md ${tabIndex === 0 ? 'btn-contained' : 'btn-elevated'}`}
  12. onClick={() => setTabIndex(0)}
  13. >
  14. </div>
  15. <div
  16. className={`flex-1 h-10 rounded-r-md ${tabIndex === 1 ? 'btn-contained' : 'btn-elevated'}`}
  17. onClick={() => setTabIndex(1)}
  18. >
  19. </div>
  20. </section>
  21. );
  22. }