Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Use `bordered-white` variant for VSearchTypeButton.vue (#1146)
Olga Bulat10ec2f9a4029
diff --git a/frontend/src/components/VButton.vue b/frontend/src/components/VButton.vueindex e44604c3b..336efb8e8 100644--- a/frontend/src/components/VButton.vue+++ b/frontend/src/components/VButton.vue@@ -354,6 +354,9 @@ a.button {.bordered-white {@apply border-white bg-white text-dark-charcoal hover:border-dark-charcoal-20;}+.bordered-white-pressed {+ @apply border border-tx bg-dark-charcoal text-white hover:border-dark-charcoal-90 hover:bg-dark-charcoal-90;+}.bordered-gray {@apply border-dark-charcoal-20 bg-white text-dark-charcoal hover:border-dark-charcoal;@@ -416,48 +419,6 @@ a.button {@apply border-tx bg-dark-charcoal text-white;}-.action-menu {- @apply border-tx bg-white text-dark-charcoal hover:border-dark-charcoal-20 group-focus-within:hover:border-tx;-}-.action-menu-pressed {- @apply border-tx bg-dark-charcoal text-white hover:border-tx hover:bg-dark-charcoal-90;-}--/**-Similar to `action-menu`, but always has a border, not only on hover.-https://www.figma.com/file/GIIQ4sDbaToCfFQyKMvzr8/Openverse-Design-Library?node-id=1684%3A3678- */-.action-menu-bordered {- @apply border-dark-charcoal-20 bg-white text-dark-charcoal focus-visible:border-tx;-}-.action-menu-bordered-pressed {- @apply border-dark-charcoal bg-dark-charcoal text-white hover:bg-dark-charcoal-90;-}--.action-menu-muted {- @apply border-tx bg-dark-charcoal-10 text-dark-charcoal hover:border-dark-charcoal-20;-}-.action-menu-muted-pressed {- @apply border-tx bg-dark-charcoal text-white hover:border-tx hover:bg-dark-charcoal-90;-}--.action-menu[disabled="disabled"],-.action-menu[aria-disabled="true"],-.action-menu-muted[disabled="disabled"],-.action-menu-muted[aria-disabled="true"],-.action-menu-bordered[disabled="disabled"],-.action-menu-bordered[aria-disabled="true"] {- @apply border-dark-charcoal-10 bg-dark-charcoal-10 text-dark-charcoal-40;-}--.action-menu-secondary {- @apply border border-tx bg-white text-dark-charcoal hover:border-dark-charcoal-20;-}--.action-menu-secondary-pressed {- @apply border-tx bg-dark-charcoal text-white;-}-.full {@apply w-full bg-dark-charcoal-06 font-semibold hover:bg-dark-charcoal-40 hover:text-white;}diff --git a/frontend/src/components/VContentSwitcher/VSearchTypeButton.vue b/frontend/src/components/VContentSwitcher/VSearchTypeButton.vueindex 16ab1f279..12aea799d 100644--- a/frontend/src/components/VContentSwitcher/VSearchTypeButton.vue+++ b/frontend/src/components/VContentSwitcher/VSearchTypeButton.vue@@ -1,9 +1,9 @@<template><VButton- class="group h-12 flex-shrink-0 gap-2"- :class="showLabel ? 'w-auto gap-2 px-3' : 'w-12'"- variant="action-menu"- size="disabled"+ class="min-w-12 gap-x-2"+ :class="showLabel ? '!px-3' : 'w-12'"+ variant="bordered-white"+ size="large":aria-label="$t('search-type.select-label', { type: label })"v-bind="$attrs"@click="$emit('click')"diff --git a/frontend/src/components/meta/VButtonOld.stories.mdx b/frontend/src/components/meta/VButtonOld.stories.mdxindex c2105dc58..bda7d135d 100644--- a/frontend/src/components/meta/VButtonOld.stories.mdx+++ b/frontend/src/components/meta/VButtonOld.stories.mdx@@ -146,36 +146,3 @@ There are three variants of secondary buttons: filled, bordered and text{VariantsTemplate.bind({})}</Story></Canvas>--### Action-menu--The styles used for header 'action-menu' buttons.--'action-menu' also has no border and no background. On hover, there is a light-border. It is used in the desktop header buttons and for the content type-switcher inside the searchbar.--'action-menu-bordered' has a border but no background. It is used in the desktop-header buttons when the (old) header is scrolled.--'action-menu-muted' has a light charcoal background. It is used for filters when-some filters are applied.--<Canvas>- <Story- name="action-menu"- args={{- variants: ["action-menu", "action-menu-bordered", "action-menu-muted"],- }}- argTypes={{- pressed: { control: "boolean" },- size: {- options: buttonSizes,- control: { type: "radio" },- },- disabled: { control: "boolean" },- }}- >- {VariantsTemplate.bind({})}- </Story>-</Canvas>diff --git a/frontend/src/styles/tailwind.css b/frontend/src/styles/tailwind.cssindex e899384d3..ed22a898c 100644--- a/frontend/src/styles/tailwind.css+++ b/frontend/src/styles/tailwind.css@@ -108,7 +108,7 @@ Time - 11px - xs semibold (default leading-tight)}.label-regular {- @apply text-sm;+ @apply text-sm font-normal;}.caption-regular {diff --git a/frontend/src/types/button.ts b/frontend/src/types/button.tsindex c9f0ff397..8c0ae3206 100644--- a/frontend/src/types/button.ts+++ b/frontend/src/types/button.ts@@ -9,11 +9,6 @@ export const buttonVariants = ["secondary-filled","menu","text",- "action-menu",- "action-menu-bordered",- "action-menu-bordered-pressed",- "action-menu-muted",- "action-menu-muted-pressed","plain","plain--avoid","full",