-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(@dpc-sdp/ripple-tide-search): added geolocate button to custom c…
…ollections/maps
- Loading branch information
1 parent
99a5811
commit 0e48279
Showing
7 changed files
with
264 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
packages/ripple-ui-maps/src/components/geolocation/RplMapGeolocateButton.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
.rpl-map-geolocate-btn { | ||
display: inline-flex; | ||
align-items: center; | ||
justify-content: center; | ||
gap: var(--rpl-sp-2); | ||
box-sizing: border-box; | ||
color: var(--rpl-clr-link); | ||
|
||
.rpl-icon { | ||
transition: transform var(--rpl-motion-speed-7) linear; | ||
} | ||
|
||
span { | ||
text-decoration: underline; | ||
} | ||
|
||
&:hover { | ||
span { | ||
text-decoration: none; | ||
} | ||
} | ||
|
||
&:focus-visible { | ||
span { | ||
text-decoration: none; | ||
} | ||
} | ||
|
||
&[disabled] { | ||
color: var(--rpl-clr-link-disabled); | ||
cursor: not-allowed; | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
...ges/ripple-ui-maps/src/components/geolocation/RplMapGeolocateButton.stories.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { | ||
Canvas, | ||
Meta, | ||
Story, | ||
ArgsTable | ||
} from '@storybook/addon-docs' | ||
import RplMapGeolocateButton from './RplMapGeolocateButton.vue' | ||
import { action } from '@storybook/addon-actions'; | ||
import '@dpc-sdp/ripple-ui-core/style/components' | ||
|
||
export const SingleTemplate = (args) => ({ | ||
components: { RplMapGeolocateButton }, | ||
setup() { | ||
return { args, callAction: action } | ||
}, | ||
template: `<RplMapGeolocateButton @onGeolocate="geolocateAction" v-bind="args"></RplMapGeolocateButton>`, | ||
methods: { | ||
geolocateAction: action('onGeolocate'), | ||
} | ||
}) | ||
|
||
<Meta | ||
title='Maps/Geolocate Button' | ||
component={RplMapGeolocateButton} | ||
argTypes={{ | ||
title: { | ||
control: { type: 'text' }, | ||
} | ||
}} | ||
args={{ | ||
title: 'Legend' | ||
}} | ||
/> | ||
|
||
# Tag | ||
|
||
<ArgsTable of={RplMapGeolocateButton} /> | ||
|
||
## Default | ||
|
||
<Canvas> | ||
<Story | ||
name='Default' | ||
> | ||
{SingleTemplate.bind()} | ||
</Story> | ||
</Canvas> |
Oops, something went wrong.