/
gsam
/
ui-kit-ce
Обзор
Документация
Войти
/
gsam
/
ui-kit-ce
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
packages/loading-button/examples/CustomComponents.tsx
42 строки
878 B
Урядышев Павел Александрович
chore: устранены предупреждения eslint
25 июл 2025, 14:03
25 июл 2025, 14:03
1bad2f7
Код
Авторство
О чём код?
import * as React from 'react' import { LoadingButton, LoaderPrefixProps, LoaderSuffixProps, createUseStyles, } from '@v-uik/base' import * as Icons from '@v-uik/icons' const useStyles = createUseStyles({ '@keyframes rotateAnimation': { '100%': { transform: 'rotate(360deg)', }, }, loading: { animation: '$rotateAnimation 0.5s linear infinite', }, }) const LoaderPrefix: React.FC<LoaderPrefixProps> = () => { const classes = useStyles() return <Icons.Loader2 className={classes.loading} /> } const LoaderSuffix: React.FC<LoaderSuffixProps> = () => { return <Icons.Upload /> } export const CustomComponents = (): React.ReactElement => { return ( <LoadingButton isLoading showLoaderSuffix loadingTitle="Loading..." components={{ LoaderPrefix, LoaderSuffix }} > Button </LoadingButton> ) }