/
lizardking
/
react_project
Обзор
Документация
Войти
/
lizardking
/
react_project
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/shared/ui/PrimaryButton/PrimaryButton.tsx
14 строк
606 B
LizardKing
Task 5 - styles
17 окт 2025, 14:23
17 окт 2025, 14:23
4ba1ff3
Код
Авторство
О чём код?
import { type ButtonHTMLAttributes, memo } from 'react' type Props = {} & ButtonHTMLAttributes<HTMLButtonElement> function PrimaryButtonComponent({ children, className = '', type = 'button', ...rest }: Props) { const style = `bg-accent text-onAccent h-11 px-6 rounded-[--radius-md] hover:opacity-90 focus:outline-none focus:ring-2 focus:ring-accent disabled:opacity-50 disabled:cursor-not-allowed ${className}` return <button {...rest} type={type} className={style}>{children}</button> } export const PrimaryButton = memo(PrimaryButtonComponent) PrimaryButton.displayName = 'PrimaryButton'