Skip to content

Commit

Permalink
map: layout adjustments (#3573)
Browse files Browse the repository at this point in the history
Co-authored-by: Stefano Ricci <[email protected]>
  • Loading branch information
SteRiccio and SteRiccio authored Sep 20, 2024
1 parent 9d455e8 commit da0f88b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion webapp/components/buttons/ButtonNext.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Button } from './Button'

export const ButtonNext = (props) => {
const { label = 'common.next' } = props
return <Button {...props} iconClassName="icon-arrow-right icon-12px icon-left" label={label} />
return <Button {...props} iconClassName="icon-arrow-right icon-12px" label={label} />
}

ButtonNext.propTypes = {
Expand Down
2 changes: 1 addition & 1 deletion webapp/components/buttons/ButtonPrevious.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Button } from './Button'

export const ButtonPrevious = (props) => {
const { label = 'common.previous' } = props
return <Button {...props} iconClassName="icon-arrow-left icon-12px icon-left" label={label} />
return <Button {...props} iconClassName="icon-arrow-left icon-12px" label={label} />
}

ButtonPrevious.propTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

button {
margin: 0 0.4rem;
padding: 0.6rem 0.6rem;
padding: 0.4rem 0.6rem;
white-space: nowrap;
}

Expand Down
7 changes: 1 addition & 6 deletions webapp/views/App/views/Data/MapView/MapView.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { useSurvey } from '@webapp/store/survey'

import { useRandomColors } from '@webapp/components/hooks/useRandomColors'
import { Map } from '@webapp/components/Map'
import SurveyDefsLoader from '@webapp/components/survey/SurveyDefsLoader'

import { SamplingPointDataLayer } from './SamplingPointDataLayer'
import { CoordinateAttributeDataLayer } from './CoordinateAttributeDataLayer'
Expand Down Expand Up @@ -106,8 +105,4 @@ const MapWrapper = () => {
)
}

export const MapView = () => (
<SurveyDefsLoader draft={false} requirePublish>
<MapWrapper />
</SurveyDefsLoader>
)
export const MapView = () => <MapWrapper />
5 changes: 5 additions & 0 deletions webapp/views/App/views/Data/MapView/MapView.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@

button {
margin: 0;
height: 2rem;
}

.new-record-btn {
width: 20rem;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ ${itemCodes
)}
{canCreateRecord && !recordUuid && (
<ButtonAdd
className="new-record-btn"
label="mapView.createRecord"
showLabel
onClick={() => createRecordFromSamplingPointDataItem({ itemUuid, callback: onRecordCreate })}
Expand Down

0 comments on commit da0f88b

Please sign in to comment.