Skip to content

Commit

Permalink
fix: changes based on feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
hroth1994 committed Sep 23, 2024
1 parent f1686e1 commit da0cca5
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 8 deletions.
11 changes: 11 additions & 0 deletions es-bs-base/scss/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@
}
}

.nav-button {
&:hover {
background: variables.$blue-50 !important;
}

&:focus,
&.focus {
border-color: variables.$blue-500;
}
}

//
// Tabs
//
Expand Down
9 changes: 8 additions & 1 deletion es-design-system/layouts/nav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
v-model="searchText"
:account-content="accountContent"
:global-content="globalContent"
show-search>
show-search
@searchButtonClicked="searchButtonClicked">
<template #logo>
<ds-es-logo />
</template>
Expand Down Expand Up @@ -84,5 +85,11 @@ export default {
return getEsNavBarGlobalContent();
},
},
methods: {
searchButtonClicked() {
/* eslint-disable-next-line no-console */
console.log('Searching...');
},
},
};
</script>
6 changes: 3 additions & 3 deletions es-design-system/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions es-vue-base/src/lib-components/EsNavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@
class="nav-item d-none d-lg-block pt-100">
<es-button
variant="link"
class="nav-link dropdown-toggle d-none d-lg-flex flex-nowrap py-100"
aria-label="Open search bar"
class="nav-button nav-link dropdown-toggle d-none d-lg-flex flex-nowrap py-100"
@click="toggleSearchBar()">
<icon-search
class="align-self-center account-icon"
Expand All @@ -124,10 +125,12 @@
<div class="row w-100">
<es-nav-bar-search-bar
v-bind="$attrs"
v-on="$listeners">
v-on="$listeners"
@searchButtonClicked="searchButtonClicked">
<template #close>
<es-button
class="position-absolute"
class="position-absolute nav-button"
aria-label="Close search bar"
style="right: 0"
variant="link"
@click="toggleSearchBar()">
Expand Down Expand Up @@ -452,6 +455,9 @@ export default {
toggleSearchBar() {
this.searchBarOpen = !this.searchBarOpen;
},
searchButtonClicked() {
this.$emit('searchButtonClicked');
},
},
};
</script>
12 changes: 11 additions & 1 deletion es-vue-base/src/lib-components/EsNavBarSearchBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
<icon-search />
</template>
</es-form-input>
<es-button class="ml-50">
<es-button
class="ml-50"
@click="$emit('searchButtonClicked')">
{{ buttonText }}
</es-button>
</div>
Expand All @@ -21,9 +23,17 @@
</template>

<script lang="js">
import EsButton from './EsButton.vue';
import EsFormInput from './EsFormInput.vue';
import IconSearch from '../lib-icons/icon-search.vue';
export default {
name: 'EsNavBarSearchBar',
components: {
EsButton,
EsFormInput,
IconSearch

Check failure on line 35 in es-vue-base/src/lib-components/EsNavBarSearchBar.vue

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest, 16)

Missing trailing comma
},
props: {
label: {
type: String,
Expand Down

0 comments on commit da0cca5

Please sign in to comment.