Add danger-link button

merge-requests/1528/head
Justin 2022-06-14 14:17:35 -04:00
rodzic fb94cb8cd1
commit e39c8d6713
2 zmienionych plików z 3 dodań i 4 usunięć

Wyświetl plik

@ -1,6 +1,6 @@
import classNames from 'classnames';
type ButtonThemes = 'primary' | 'secondary' | 'ghost' | 'accent' | 'danger' | 'transparent' | 'link'
type ButtonThemes = 'primary' | 'secondary' | 'ghost' | 'accent' | 'danger' | 'transparent' | 'link' | 'danger-link'
type ButtonSizes = 'sm' | 'md' | 'lg'
type IButtonStyles = {
@ -25,6 +25,7 @@ const useButtonStyles = ({
ghost: 'shadow-none border-gray-200 text-gray-700 bg-white dark:border-slate-700 dark:bg-slate-800 dark:text-slate-200 focus:ring-primary-500 focus:ring-2 focus:ring-offset-2',
accent: 'border-transparent text-white bg-accent-500 hover:bg-accent-300 focus:ring-pink-500 focus:ring-2 focus:ring-offset-2',
danger: 'border-transparent text-danger-700 bg-danger-100 hover:bg-danger-200 focus:ring-danger-500 focus:ring-2 focus:ring-offset-2',
'danger-link': 'border-transparent text-accent-500 hover:bg-accent-500 hover:bg-opacity-10',
transparent: 'border-transparent text-gray-800 backdrop-blur-sm bg-white/75 hover:bg-white/80',
link: 'border-transparent text-primary-600 dark:text-primary-400 hover:bg-primary-100 hover:text-primary-700 dark:hover:bg-slate-900/50',
};

Wyświetl plik

@ -1,5 +1,3 @@
'use strict';
import React from 'react';
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
@ -192,7 +190,7 @@ const PollForm = () => {
{/* Remove Poll */}
<div className='text-center'>
<Button theme='danger' size='sm' onClick={onRemovePoll}>
<Button theme='danger-link' onClick={onRemovePoll}>
{intl.formatMessage(messages.removePoll)}
</Button>
</div>