Skip to content

Commit

Permalink
feat(*): add world-private icon (#69)
Browse files Browse the repository at this point in the history
* feat(*): add world-private icon

* fix(sandbox): minor fix
  • Loading branch information
portikM committed Sep 20, 2023
1 parent b90ce02 commit 0998c42
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
20 changes: 19 additions & 1 deletion sandbox/components/PageHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@
</template>

<script setup lang="ts">
import { ref, watch } from 'vue'
import { onMounted, ref, watch } from 'vue'
import { ExternalLinkIcon } from '@/components'
import { useRoute, useRouter } from 'vue-router'
const route = useRoute()
const router = useRouter()
const emit = defineEmits<{
(e: 'search', value: string): void
Expand All @@ -36,7 +40,21 @@ const query = ref('')
watch(query, (searchQuery: string) => {
emit('search', searchQuery)
if (searchQuery) {
if (searchQuery !== route.query.search) {
router.push({ name: 'home', query: { search: searchQuery } })
}
} else {
router.push({ name: 'home' })
}
}, { immediate: true })
onMounted(() => {
if (route.query.search) {
query.value = route.query.search as string
}
})
</script>

<style lang="scss" scoped>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ exports[`generate > \`/src/components/index.ts\` file > has exports that match t
"WarningOutlineIcon",
"WarningIcon",
"WorkspacesIcon",
"WorldPrivateIcon",
"WorldIcon",
]
`;
Expand Down
1 change: 1 addition & 0 deletions src/tests/__snapshots__/WorldPrivateIcon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<span data-v-4b0aa218="" class="kui-icon world-private-icon" data-testid="kui-icon-wrapper-world-private-icon" style="box-sizing: border-box; color: rgb(0, 68, 244); display: inline-flex; height: 32px; line-height: 0; width: 32px;"><svg data-v-4b0aa218="" data-testid="kui-icon-svg-world-private-icon" fill="none" height="100%" role="img" viewBox="0 0 24 24" width="100%" xmlns="http://www.w3.org/2000/svg"><title data-v-4b0aa218="" data-testid="kui-icon-svg-title">My custom title</title><path data-v-4b0aa218="" d="M12 22C10.6333 22 9.34167 21.7375 8.125 21.2125C6.90833 20.6875 5.84583 19.9708 4.9375 19.0625C4.02917 18.1542 3.3125 17.0917 2.7875 15.875C2.2625 14.6583 2 13.3667 2 12C2 10.6167 2.2625 9.32083 2.7875 8.1125C3.3125 6.90417 4.02917 5.84583 4.9375 4.9375C5.84583 4.02917 6.90833 3.3125 8.125 2.7875C9.34167 2.2625 10.6333 2 12 2C12.5333 2 13.0458 2.0375 13.5375 2.1125C14.0292 2.1875 14.5167 2.3 15 2.45V5C15 5.55 14.8042 6.02083 14.4125 6.4125C14.0208 6.80417 13.55 7 13 7H11V9C11 9.28333 10.9042 9.52083 10.7125 9.7125C10.5208 9.90417 10.2833 10 10 10H8V12H14C14.2833 12 14.5208 12.0958 14.7125 12.2875C14.9042 12.4792 15 12.7167 15 13V16H16C16.45 16 16.8458 16.1333 17.1875 16.4C17.5292 16.6667 17.7667 17 17.9 17.4C18.55 16.6667 19.0625 15.8458 19.4375 14.9375C19.8125 14.0292 20 13.05 20 12C20 11.8167 19.9917 11.65 19.975 11.5C19.9583 11.35 19.9333 11.1833 19.9 11H21.95C21.9833 11.1833 22 11.35 22 11.5V12C22 13.3667 21.7375 14.6583 21.2125 15.875C20.6875 17.0917 19.9708 18.1542 19.0625 19.0625C18.1542 19.9708 17.0958 20.6875 15.8875 21.2125C14.6792 21.7375 13.3833 22 12 22ZM11 19.95V18C10.45 18 9.97917 17.8042 9.5875 17.4125C9.19583 17.0208 9 16.55 9 16V15L4.2 10.2C4.15 10.5 4.10417 10.8 4.0625 11.1C4.02083 11.4 4 11.7 4 12C4 14.0667 4.67083 15.8458 6.0125 17.3375C7.35417 18.8292 9.01667 19.7 11 19.95ZM18 9C17.7167 9 17.4792 8.90417 17.2875 8.7125C17.0958 8.52083 17 8.28333 17 8V5C17 4.71667 17.0958 4.47917 17.2875 4.2875C17.4792 4.09583 17.7167 4 18 4V3C18 2.45 18.1958 1.97917 18.5875 1.5875C18.9792 1.19583 19.45 1 20 1C20.55 1 21.0208 1.19583 21.4125 1.5875C21.8042 1.97917 22 2.45 22 3V4C22.2833 4 22.5208 4.09583 22.7125 4.2875C22.9042 4.47917 23 4.71667 23 5V8C23 8.28333 22.9042 8.52083 22.7125 8.7125C22.5208 8.90417 22.2833 9 22 9H18ZM19 4H21V3C21 2.71667 20.9042 2.47917 20.7125 2.2875C20.5208 2.09583 20.2833 2 20 2C19.7167 2 19.4792 2.09583 19.2875 2.2875C19.0958 2.47917 19 2.71667 19 3V4Z" fill="currentColor"></path></svg></span>
3 changes: 3 additions & 0 deletions svg/solid/world-private.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0998c42

Please sign in to comment.