mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 05:19:39 +02:00
feat(ui): portainer base component css change [EE-3381] (#7115)
This commit is contained in:
parent
825269c119
commit
f78a6568a6
70 changed files with 999 additions and 1596 deletions
|
@ -1,11 +1,14 @@
|
|||
import clsx from 'clsx';
|
||||
import { PropsWithChildren, ReactNode } from 'react';
|
||||
|
||||
import { Icon } from '@/react/components/Icon';
|
||||
|
||||
import { useWidgetContext } from './Widget';
|
||||
|
||||
interface Props {
|
||||
title: ReactNode;
|
||||
icon: ReactNode;
|
||||
featherIcon?: boolean;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
|
@ -14,6 +17,7 @@ export function WidgetTitle({
|
|||
icon,
|
||||
className,
|
||||
children,
|
||||
featherIcon,
|
||||
}: PropsWithChildren<Props>) {
|
||||
useWidgetContext();
|
||||
|
||||
|
@ -21,7 +25,7 @@ export function WidgetTitle({
|
|||
<div className="widget-header">
|
||||
<div className="row">
|
||||
<span className={clsx('pull-left', className)}>
|
||||
{typeof icon === 'string' ? <i className={clsx('fa', icon)} /> : icon}
|
||||
<Icon icon={icon} feather={featherIcon} className="space-right" />
|
||||
<span>{title}</span>
|
||||
</span>
|
||||
<span className={clsx('pull-right', className)}>{children}</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue