Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@sushiswap/ui / form / FormControl.tsx
Size: Mime:
import React, { FC } from 'react'

import { classNames } from '../index'
import { Typography } from '../typography'

interface FormControl {
  label: string
  children: React.ReactNode
  disabled?: boolean
  className?: string
}

export const FormControl: FC<FormControl> = ({ className, label, children, disabled = false }) => {
  return (
    <div
      aria-disabled={disabled}
      className={classNames(className, disabled ? 'opacity-40 pointer-events-none' : '', 'flex flex-col gap-2')}
    >
      <Typography variant="sm" weight={500} className="text-slate-200">
        {label}
      </Typography>
      {children}
    </div>
  )
}