5180 fichiers 38.5 Mo 0 téléchargements 249 vues mis à jour il y a 5 heures ui
nitro-v36-with-renderer-v36 / src / common / layout / LayoutColorSwatchView.tsx
LayoutColorSwatchView.tsx 770 o Télécharger le fichier
import { FC } from 'react';
import { BaseButton } from '../BaseButton';
import { ToggleButton } from '../ToggleButton';
import { Hint } from '../Tooltip';

interface LayoutColorSwatchViewProps
{
    color: string;
    active?: boolean;
    title?: string;
    onClick?: () => void;
}

export const LayoutColorSwatchView: FC<LayoutColorSwatchViewProps> = ({ color, active = false, title = undefined, onClick = undefined }) =>
{
    return (
        <Hint content={title}>
            <ToggleButton aria-label={title} pressed={active}
                className={`octane-color-swatch${ active ? ' is-active' : '' }`}
                style={{ backgroundColor: color }}
                type="button"
                onClick={onClick}
            />
        </Hint>
    );
};
15Sujets
1Dépôts
20Membres
2En ligne
Profile
Inscrit
Dernière visite
Messages
0
Votes positifs
0
Votes négatifs
0

Nous utilisons des cookies pour assurer le bon fonctionnement du site et améliorer votre expérience. en savoir plus

Autoriser