mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
feat: add 'no color' option for button style customization
Adds a 'default' style option that removes color from buttons, showing Telegram's native default style. Updates type, UI chip, preview, and translations for all 4 locales.
This commit is contained in:
@@ -9,9 +9,10 @@ import {
|
||||
ButtonSection,
|
||||
} from '../../api/buttonStyles';
|
||||
|
||||
type StyleValue = 'primary' | 'success' | 'danger';
|
||||
type StyleValue = 'primary' | 'success' | 'danger' | 'default';
|
||||
|
||||
const STYLE_OPTIONS: { value: StyleValue; colorClass: string }[] = [
|
||||
{ value: 'default', colorClass: 'bg-dark-500' },
|
||||
{ value: 'primary', colorClass: 'bg-blue-500' },
|
||||
{ value: 'success', colorClass: 'bg-green-500' },
|
||||
{ value: 'danger', colorClass: 'bg-red-500' },
|
||||
@@ -134,12 +135,14 @@ export function ButtonsTab() {
|
||||
</div>
|
||||
{/* Live preview chip */}
|
||||
<div
|
||||
className={`rounded-lg px-3 py-1.5 text-xs font-medium text-white ${
|
||||
cfg.style === 'success'
|
||||
? 'bg-green-500'
|
||||
: cfg.style === 'danger'
|
||||
? 'bg-red-500'
|
||||
: 'bg-blue-500'
|
||||
className={`rounded-lg px-3 py-1.5 text-xs font-medium ${
|
||||
cfg.style === 'default'
|
||||
? 'bg-dark-600 text-dark-300'
|
||||
: cfg.style === 'success'
|
||||
? 'bg-green-500 text-white'
|
||||
: cfg.style === 'danger'
|
||||
? 'bg-red-500 text-white'
|
||||
: 'bg-blue-500 text-white'
|
||||
}`}
|
||||
>
|
||||
{t(`admin.buttons.styles.${cfg.style}`)}
|
||||
|
||||
Reference in New Issue
Block a user