mirror of
https://github.com/zhigang1992/react-native-hold-menu.git
synced 2026-01-13 17:32:21 +08:00
chore: update destructive text colors
This commit is contained in:
@@ -65,7 +65,13 @@ const Playground = ({}: PlaygroundProps) => {
|
||||
onPress: () => {
|
||||
console.log('[ACTION]: Delete');
|
||||
},
|
||||
icon: () => <Icon name="trash" size={18} color={'red'} />,
|
||||
icon: () => (
|
||||
<Icon
|
||||
name="trash"
|
||||
size={18}
|
||||
color={theme == 'dark' ? 'rgb(255, 59,48)' : 'rgb(255, 69,58)'}
|
||||
/>
|
||||
),
|
||||
withSeperator: true,
|
||||
isDestructive: true,
|
||||
},
|
||||
|
||||
@@ -13,7 +13,8 @@ import {
|
||||
BORDER_LIGHT_COLOR,
|
||||
BORDER_DARK_COLOR,
|
||||
MENU_TITLE_COLOR,
|
||||
MENU_TEXT_DESTRUCTIVE_COLOR,
|
||||
MENU_TEXT_DESTRUCTIVE_COLOR_LIGHT,
|
||||
MENU_TEXT_DESTRUCTIVE_COLOR_DARK,
|
||||
MENU_TEXT_DARK_COLOR,
|
||||
MENU_TEXT_LIGHT_COLOR,
|
||||
} from './constants';
|
||||
@@ -46,7 +47,9 @@ const MenuItemComponent = ({ item, isLast, theme }: MenuItemComponentProps) => {
|
||||
color: item.isTitle
|
||||
? MENU_TITLE_COLOR
|
||||
: item.isDestructive
|
||||
? MENU_TEXT_DESTRUCTIVE_COLOR
|
||||
? theme === 'dark'
|
||||
? MENU_TEXT_DESTRUCTIVE_COLOR_DARK
|
||||
: MENU_TEXT_DESTRUCTIVE_COLOR_LIGHT
|
||||
: theme === 'dark'
|
||||
? MENU_TEXT_DARK_COLOR
|
||||
: MENU_TEXT_LIGHT_COLOR,
|
||||
|
||||
@@ -4,4 +4,6 @@ export const BORDER_DARK_COLOR = 'rgba(255, 255, 255, 0.1)';
|
||||
export const MENU_TITLE_COLOR = 'gray';
|
||||
export const MENU_TEXT_LIGHT_COLOR = 'rgba(0, 0, 0, 1)';
|
||||
export const MENU_TEXT_DARK_COLOR = 'rgb(255, 255, 255)';
|
||||
export const MENU_TEXT_DESTRUCTIVE_COLOR = 'rgb(255, 50,30)';
|
||||
|
||||
export const MENU_TEXT_DESTRUCTIVE_COLOR_LIGHT = 'rgb(255, 59,48)';
|
||||
export const MENU_TEXT_DESTRUCTIVE_COLOR_DARK = 'rgb(255, 69,58)';
|
||||
|
||||
Reference in New Issue
Block a user