wwf
3 天以前 a430284aa21e3ae1f0d5654e55b2ad2852519cc2
app/components/base/tab-slider-plain/index.tsx
@@ -5,7 +5,7 @@
type Option = {
  value: string
  text: string | React.JSX.Element
  text: string | JSX.Element
}
type ItemProps = {
@@ -13,29 +13,26 @@
  isActive: boolean
  onClick: (v: string) => void
  option: Option
  smallItem?: boolean
}
const Item: FC<ItemProps> = ({
  className,
  isActive,
  onClick,
  option,
  smallItem,
}) => {
  return (
    <div
      key={option.value}
      className={cn(
        'relative pb-2.5 ',
        'relative pb-2.5 system-xl-semibold',
        !isActive && 'cursor-pointer',
        smallItem ? 'system-sm-semibold-uppercase' : 'system-xl-semibold',
        className,
      )}
      onClick={() => !isActive && onClick(option.value)}
    >
      <div className={cn(isActive ? 'text-text-primary' : 'text-text-tertiary')}>{option.text}</div>
      {isActive && (
        <div className='absolute bottom-0 left-0 right-0 h-0.5 bg-util-colors-blue-brand-blue-brand-600'></div>
        <div className='absolute bottom-0 left-0 right-0 h-0.5 bg-util-colors-blue-blue-500'></div>
      )}
    </div>
  )
@@ -47,7 +44,6 @@
  onChange: (v: string) => void
  options: Option[]
  noBorderBottom?: boolean
  smallItem?: boolean
  itemClassName?: string
}
@@ -58,7 +54,6 @@
  options,
  noBorderBottom,
  itemClassName,
  smallItem,
}) => {
  return (
    <div className={cn(className, !noBorderBottom && 'border-b border-divider-subtle', 'flex  space-x-6')}>
@@ -69,7 +64,6 @@
          onClick={onChange}
          key={option.value}
          className={itemClassName}
          smallItem={smallItem}
        />
      ))}
    </div>