/
githubmirror
/
traefik
Обзор
Документация
Войти
/
githubmirror
/
traefik
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
webui/src/components/buttons/IconButton.tsx
19 строк
610 B
Murat Aslan
Display server weight in service detail view
30 мар 2026, 17:58
Не верифицирован
30 мар 2026, 17:58
9a8ff96
Код
Авторство
О чём код?
import { Button, Flex, Text } from '@traefik-labs/faency' import { ComponentProps, ReactNode } from 'react' type IconButtonProps = ComponentProps<typeof Button> & { gap?: 1 | 2 icon: ReactNode text?: string } export default function IconButton({ css = {}, gap = 2, icon, text, ...props }: IconButtonProps) { return ( <Button variant="primary" size="large" css={{ borderRadius: 0, ...css }} {...props}> <Flex align="center" justify="between" gap={gap}> {icon} {text && <Text css={{ color: 'currentColor', paddingTop: '1px' }}>{text}</Text>} </Flex> </Button> ) }