/
ai_sampletext
/
DiplomWork
Обзор
Документация
Войти
/
ai_sampletext
/
DiplomWork
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
node_modules/react-day-picker/src/components/Button/Button.tsx
34 строки
897 B
boolyshareyo
Initial commit
08 июн 2026, 16:00
08 июн 2026, 16:00
6216a29
Код
Авторство
О чём код?
import { forwardRef } from 'react'; import { useDayPicker } from 'contexts/DayPicker'; /** The props for the {@link Button} component. */ export type ButtonProps = JSX.IntrinsicElements['button']; /** Render a button HTML element applying the reset class name. */ export const Button = forwardRef<HTMLButtonElement, ButtonProps>( (props, ref) => { const { classNames, styles } = useDayPicker(); const classNamesArr = [classNames.button_reset, classNames.button]; if (props.className) { classNamesArr.push(props.className); } const className = classNamesArr.join(' '); const style = { ...styles.button_reset, ...styles.button }; if (props.style) { Object.assign(style, props.style); } return ( <button {...props} ref={ref} type="button" className={className} style={style} /> ); } );