This commit is contained in:
Paul Frazee
2023-03-08 13:57:58 -06:00
parent 18347bdb22
commit 360322f475
4 changed files with 32 additions and 3 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ import {Text} from './text/Text'
export function PostMutedWrapper({ export function PostMutedWrapper({
isMuted, isMuted,
children, children,
}: React.PropsWithChildren<{isMuted: boolean}>) { }: React.PropsWithChildren<{isMuted?: boolean}>) {
const pal = usePalette('default') const pal = usePalette('default')
const [override, setOverride] = React.useState(false) const [override, setOverride] = React.useState(false)
if (!isMuted || override) { if (!isMuted || override) {
+10
View File
@@ -41,6 +41,9 @@ export function RadioButton({
'secondary-light': { 'secondary-light': {
borderColor: theme.palette.secondary.border, borderColor: theme.palette.secondary.border,
}, },
default: {
borderColor: theme.palette.default.border,
},
'default-light': { 'default-light': {
borderColor: theme.palette.default.border, borderColor: theme.palette.default.border,
}, },
@@ -69,6 +72,9 @@ export function RadioButton({
'secondary-light': { 'secondary-light': {
backgroundColor: theme.palette.secondary.background, backgroundColor: theme.palette.secondary.background,
}, },
default: {
backgroundColor: theme.palette.primary.background,
},
'default-light': { 'default-light': {
backgroundColor: theme.palette.primary.background, backgroundColor: theme.palette.primary.background,
}, },
@@ -103,6 +109,10 @@ export function RadioButton({
color: theme.palette.secondary.textInverted, color: theme.palette.secondary.textInverted,
fontWeight: theme.palette.secondary.isLowContrast ? '500' : undefined, fontWeight: theme.palette.secondary.isLowContrast ? '500' : undefined,
}, },
default: {
color: theme.palette.default.text,
fontWeight: theme.palette.default.isLowContrast ? '500' : undefined,
},
'default-light': { 'default-light': {
color: theme.palette.default.text, color: theme.palette.default.text,
fontWeight: theme.palette.default.isLowContrast ? '500' : undefined, fontWeight: theme.palette.default.isLowContrast ? '500' : undefined,
+12
View File
@@ -42,6 +42,9 @@ export function ToggleButton({
'secondary-light': { 'secondary-light': {
borderColor: theme.palette.secondary.border, borderColor: theme.palette.secondary.border,
}, },
default: {
borderColor: theme.palette.default.border,
},
'default-light': { 'default-light': {
borderColor: theme.palette.default.border, borderColor: theme.palette.default.border,
}, },
@@ -77,6 +80,11 @@ export function ToggleButton({
backgroundColor: theme.palette.secondary.background, backgroundColor: theme.palette.secondary.background,
opacity: isSelected ? 1 : 0.5, opacity: isSelected ? 1 : 0.5,
}, },
default: {
backgroundColor: isSelected
? theme.palette.primary.background
: colors.gray3,
},
'default-light': { 'default-light': {
backgroundColor: isSelected backgroundColor: isSelected
? theme.palette.primary.background ? theme.palette.primary.background
@@ -113,6 +121,10 @@ export function ToggleButton({
color: theme.palette.secondary.textInverted, color: theme.palette.secondary.textInverted,
fontWeight: theme.palette.secondary.isLowContrast ? '500' : undefined, fontWeight: theme.palette.secondary.isLowContrast ? '500' : undefined,
}, },
default: {
color: theme.palette.default.text,
fontWeight: theme.palette.default.isLowContrast ? '500' : undefined,
},
'default-light': { 'default-light': {
color: theme.palette.default.text, color: theme.palette.default.text,
fontWeight: theme.palette.default.isLowContrast ? '500' : undefined, fontWeight: theme.palette.default.isLowContrast ? '500' : undefined,
+9 -2
View File
@@ -7,7 +7,10 @@ import {
TouchableWithoutFeedback, TouchableWithoutFeedback,
View, View,
} from 'react-native' } from 'react-native'
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import {
FontAwesomeIcon,
FontAwesomeIconStyle,
} from '@fortawesome/react-native-fontawesome'
import {ScrollView} from '../com/util/Views' import {ScrollView} from '../com/util/Views'
import {observer} from 'mobx-react-lite' import {observer} from 'mobx-react-lite'
import {UserAvatar} from '../com/util/UserAvatar' import {UserAvatar} from '../com/util/UserAvatar'
@@ -133,7 +136,11 @@ export const Search = observer(({navIdx, visible, params}: ScreenParams) => {
/> />
{query ? ( {query ? (
<TouchableOpacity onPress={onPressClearQuery}> <TouchableOpacity onPress={onPressClearQuery}>
<FontAwesomeIcon icon="xmark" size={16} style={pal.textLight} /> <FontAwesomeIcon
icon="xmark"
size={16}
style={pal.textLight as FontAwesomeIconStyle}
/>
</TouchableOpacity> </TouchableOpacity>
) : undefined} ) : undefined}
</View> </View>