Skip to content

Commit

Permalink
feat: change site depth presets button from Icon to Text (#2483)
Browse files Browse the repository at this point in the history
  • Loading branch information
shrouxm authored Nov 19, 2024
1 parent ce631dd commit 986be7a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dev-client/src/components/buttons/TextButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export type TextButtonType = 'default' | 'error';
export type TextButtonProps = {
label: string;
type?: TextButtonType;
role: AccessibilityProps['role'];
role?: AccessibilityProps['role'];
leftIcon?: IconName;
rightIcon?: IconName;
disabled?: boolean;
Expand All @@ -38,7 +38,7 @@ export type TextButtonProps = {
export const TextButton = ({
label,
type = 'default',
role,
role = 'button',
leftIcon,
rightIcon,
disabled,
Expand Down
8 changes: 6 additions & 2 deletions dev-client/src/screens/SoilScreen/SoilScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import {Button, ScrollView} from 'native-base';
import {SoilIdSoilDataDepthIntervalPresetChoices} from 'terraso-client-shared/graphqlSchema/graphql';

import {AddDepthModalBody} from 'terraso-mobile-client/components/AddDepthModal';
import {IconButton} from 'terraso-mobile-client/components/buttons/icons/IconButton';
import {TextButton} from 'terraso-mobile-client/components/buttons/TextButton';
import {TranslatedHeading} from 'terraso-mobile-client/components/content/typography/TranslatedHeading';
import {Icon} from 'terraso-mobile-client/components/icons/Icon';
import {Modal} from 'terraso-mobile-client/components/modals/Modal';
Expand Down Expand Up @@ -98,7 +98,11 @@ export const SoilScreen = ({siteId}: {siteId: string}) => {
<InfoSheet
heading={<TranslatedHeading i18nKey="soil.soil_preset.header" />}
trigger={onOpen => (
<IconButton type="md" name="tune" onPress={onOpen} />
<TextButton
label={t('soil.soil_preset.label')}
rightIcon="expand-more"
onPress={onOpen}
/>
)}>
<EditSiteSoilDepthPreset
selected={soilData.depthIntervalPreset}
Expand Down

0 comments on commit 986be7a

Please sign in to comment.