Migrate Traefik Proxy dashboard UI to React
This commit is contained in:
parent
4790e4910f
commit
f16fff577a
324 changed files with 28303 additions and 19567 deletions
26
webui/src/components/resources/ResourceCard.tsx
Normal file
26
webui/src/components/resources/ResourceCard.tsx
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import { Card, CSS, Flex, Text } from '@traefiklabs/faency'
|
||||
import { ReactNode } from 'react'
|
||||
|
||||
type ResourceCardProps = {
|
||||
children: ReactNode
|
||||
css?: CSS
|
||||
title?: string
|
||||
titleCSS?: CSS
|
||||
}
|
||||
|
||||
const ResourceCard = ({ children, css, title, titleCSS = {} }: ResourceCardProps) => {
|
||||
return (
|
||||
<Card css={css}>
|
||||
<Flex direction="column" align="center" justify="center" gap={3} css={{ height: '100%', p: '$2' }}>
|
||||
{title && (
|
||||
<Text variant="subtle" css={{ letterSpacing: 3, fontSize: '$2', wordBreak: 'break-all', ...titleCSS }}>
|
||||
{title.toUpperCase()}
|
||||
</Text>
|
||||
)}
|
||||
{children}
|
||||
</Flex>
|
||||
</Card>
|
||||
)
|
||||
}
|
||||
|
||||
export default ResourceCard
|
||||
Loading…
Add table
Add a link
Reference in a new issue