Skip to content

Commit

Permalink
[SDPA-2346] Added quick-exit button for search component. (#538)
Browse files Browse the repository at this point in the history
* [SDPA-2346] Added quick-exit for search component.
  • Loading branch information
MdNadimHossain authored Sep 26, 2019
1 parent 0651eed commit a4175b7
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion packages/components/Organisms/SiteHeader/search.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<div class="rpl-site-header-search">
<rpl-quick-exit class="rpl-search__quickexit" v-if="rplOptions.quickexit" />
<rpl-search-form
class="rpl-site-header-search__form"
searchPlaceholder="Start typing..."
Expand All @@ -22,6 +23,7 @@
import RplIcon from '@dpc-sdp/ripple-icon'
import RplMetaTag from '@dpc-sdp/ripple-meta-tag'
import { RplSearchForm } from '@dpc-sdp/ripple-search'
import RplQuickExit from '@dpc-sdp/ripple-layout/QuickExit'
export default {
name: 'RplSearch',
Expand All @@ -31,7 +33,8 @@ export default {
components: {
RplIcon,
RplMetaTag,
RplSearchForm
RplSearchForm,
RplQuickExit
},
methods: {
searchTerm: function (searchInput) {
Expand All @@ -55,6 +58,7 @@ export default {
$rpl-site-header-search-term-margin: auto $rpl-space-2 $rpl-space-3 auto !default;
$rpl-site-header-search-terms-header-text-color: rpl-color('white') !default;
$rpl-site-header-search-field-underline-background-image: rpl-gradient('primary_gradient') !default;
$rpl-site-header-search-quickexit-margin-bottom: ($rpl-space * 6) !default;
.rpl-site-header-search {
$root: &;
Expand Down Expand Up @@ -101,6 +105,24 @@ export default {
color: $rpl-site-header-search-terms-header-text-color;
}
.rpl-search__quickexit {
margin-bottom: $rpl-site-header-search-quickexit-margin-bottom;
@include rpl_breakpoint('s') {
top: $rpl-space;
right: $rpl-space;
position: absolute;
}
> a {
width: 100%;
@include rpl_breakpoint('s') {
width: auto;
}
}
}
.rpl-search-form__field {
&::after {
content: '';
Expand Down

0 comments on commit a4175b7

Please sign in to comment.