Skip to content

Commit

Permalink
climbing: shrink ClimbingEditorHelperText
Browse files Browse the repository at this point in the history
  • Loading branch information
zbycz committed Oct 9, 2024
1 parent a8527fe commit ed8a5ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/components/FeaturePanel/Climbing/ClimbingCragDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { useFeatureContext } from '../../utils/FeatureContext';
import { useGetHandleSave } from './useGetHandleSave';
import { getWikimediaCommonsPhotoKeys, removeFilePrefix } from './utils/photo';
import { useMobileMode } from '../../helpers';
import { Guide } from './Guide';
import { ClimbingEditorHelperText } from './ClimbingEditorHelperText';

const Flex = styled.div`
display: flex;
Expand Down Expand Up @@ -147,7 +147,9 @@ export const ClimbingCragDialog = ({
Add new route
</Button>
)}
<Guide />
<div style={{ display: 'flex', justifyContent: 'center' }}>
<ClimbingEditorHelperText />
</div>
</>
)}
</LeftActions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const InlineBlockContainer = styled.div`
display: inline-block;
`;

export const Guide = () => {
export const ClimbingEditorHelperText = () => {
const { routeSelectedIndex, getCurrentPath, getMachine } =
useClimbingContext();
const { feature } = useFeatureContext();
Expand All @@ -31,7 +31,7 @@ export const Guide = () => {
<>
{routeSelectedIndex === null && (
<Alert severity="info">
Select route you want to draw from the list
Select route you want to draw from the list.
</Alert>
)}

Expand Down Expand Up @@ -83,7 +83,7 @@ export const Guide = () => {
</Button>
}
>
This route is not drawn yet
This route is not drawn yet.
</Alert>
)}
</>
Expand Down

0 comments on commit ed8a5ca

Please sign in to comment.