Skip to content

Commit

Permalink
fixup! feat(suite-native): new device switcher
Browse files Browse the repository at this point in the history
  • Loading branch information
vytick committed May 14, 2024
1 parent 3badc60 commit 3ae6878
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Icon } from '@suite-common/icons';
import { useDeviceManager } from '../hooks/useDeviceManager';
import { DeviceAction } from './DeviceAction';

const flexStyle = prepareNativeStyle(_ => ({
const textStyle = prepareNativeStyle(_ => ({
flex: 1,
}));

Expand All @@ -34,7 +34,7 @@ export const AddHiddenWalletButton = () => {
onPress={handleAddHiddenWallet}
flex={1}
>
<Text variant="hint" style={applyStyle(flexStyle)}>
<Text variant="hint" style={applyStyle(textStyle)}>
<Translation id="deviceManager.deviceButtons.addHiddenWallet" />
</Text>
<Icon name="chevronRight" color="iconDefault" size="mediumLarge" />
Expand Down
4 changes: 2 additions & 2 deletions suite-native/device-manager/src/components/DeviceAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const contentStyle = prepareNativeStyle(utils => ({
borderColor: utils.colors.borderElevation1,
}));

const flexStyle = prepareNativeStyle<{ showAsFullWidth: boolean; flex: number | undefined }>(
const pressableStyle = prepareNativeStyle<{ showAsFullWidth: boolean; flex: number | undefined }>(
(_, { showAsFullWidth, flex }) => {
return {
flex,
Expand Down Expand Up @@ -52,7 +52,7 @@ export const DeviceAction = ({
<Pressable
onPress={onPress}
testID={testID}
style={applyStyle(flexStyle, { showAsFullWidth, flex })}
style={applyStyle(pressableStyle, { showAsFullWidth, flex })}
>
<HStack style={applyStyle(contentStyle)}>{children}</HStack>
</Pressable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type DeviceInfoButtonProps = {
showAsFullWidth: boolean;
};

const flexStyle = prepareNativeStyle<{ showAsFullWidth: boolean }>((_, { showAsFullWidth }) => ({
const contentStyle = prepareNativeStyle<{ showAsFullWidth: boolean }>((_, { showAsFullWidth }) => ({
extend: {
condition: showAsFullWidth,
style: {
Expand Down Expand Up @@ -57,7 +57,7 @@ export const DeviceInfoButton = ({ showAsFullWidth }: DeviceInfoButtonProps) =>
onPress={handleDeviceRedirect}
showAsFullWidth={showAsFullWidth}
>
<HStack spacing="small" style={applyStyle(flexStyle, { showAsFullWidth })}>
<HStack spacing="small" style={applyStyle(contentStyle, { showAsFullWidth })}>
<Icon name="infoLight" size="mediumLarge" />
<Text variant="hint">
<Translation id="deviceManager.deviceButtons.deviceInfo" />
Expand Down

0 comments on commit 3ae6878

Please sign in to comment.