From 255bb2c0265c591a715e8be8d1ec8db3d08b3cfe Mon Sep 17 00:00:00 2001 From: fpasquet Date: Mon, 29 Jan 2024 18:06:56 +0100 Subject: [PATCH] fix: autocomplete link --- package.json | 2 +- .../CategoryEndingBlock/CategoryEndingBlock.tsx | 12 +++++++----- .../Organisms/Autocomplete/Autocomplete.stories.ts | 3 +-- .../AutocompleteResult/AutocompleteResult.scss | 1 + 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index d17e07a0..8fcae2a0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@eleven-labs/design-system", "description": "Design System for Eleven Labs", - "version": "0.26.1", + "version": "0.26.2", "repository": { "type": "git", "url": "https://github.com/eleven-labs/design-system.git" diff --git a/src/components/Molecules/Blocks/CategoryEndingBlock/CategoryEndingBlock.tsx b/src/components/Molecules/Blocks/CategoryEndingBlock/CategoryEndingBlock.tsx index 4b4250fb..f953320f 100644 --- a/src/components/Molecules/Blocks/CategoryEndingBlock/CategoryEndingBlock.tsx +++ b/src/components/Molecules/Blocks/CategoryEndingBlock/CategoryEndingBlock.tsx @@ -7,13 +7,13 @@ import type { ComponentPropsWithoutRef } from '@/types'; export interface CategoryEndingBlockProps extends BoxProps { title: React.ReactNode; description: React.ReactNode; - expertiseLink: { label: string } & ComponentPropsWithoutRef<'a'>; + expertiseLink?: { label: string } & ComponentPropsWithoutRef<'a'>; } export const CategoryEndingBlock: React.FC = ({ title, description, - expertiseLink: { label: expertiseLinkLabel, ...expertiseLink }, + expertiseLink: { label: expertiseLinkLabel, ...expertiseLink } = {}, ...props }) => ( @@ -21,8 +21,10 @@ export const CategoryEndingBlock: React.FC = ({ {title} {description} - + {expertiseLinkLabel && ( + + )} ); diff --git a/src/components/Organisms/Autocomplete/Autocomplete.stories.ts b/src/components/Organisms/Autocomplete/Autocomplete.stories.ts index 4ee5e47b..d2c558b6 100644 --- a/src/components/Organisms/Autocomplete/Autocomplete.stories.ts +++ b/src/components/Organisms/Autocomplete/Autocomplete.stories.ts @@ -1,4 +1,3 @@ -import { action } from '@storybook/addon-actions'; import type { Meta, StoryObj } from '@storybook/react'; import { Autocomplete } from './Autocomplete'; @@ -9,7 +8,7 @@ const meta: Meta = { placeholder: 'Rechercher par nom d’article ou d’auteur', searchLink: { label: 'Voir tous les résultats', - onClick: action('search'), + href: '#', }, }, parameters: { diff --git a/src/components/Organisms/Autocomplete/AutocompleteResult/AutocompleteResult.scss b/src/components/Organisms/Autocomplete/AutocompleteResult/AutocompleteResult.scss index bcc458c3..b1fd7918 100644 --- a/src/components/Organisms/Autocomplete/AutocompleteResult/AutocompleteResult.scss +++ b/src/components/Organisms/Autocomplete/AutocompleteResult/AutocompleteResult.scss @@ -25,6 +25,7 @@ filter: drop-shadow(0 4px 14px rgb(0 0 0 / 25%)); &__item { + position: relative; display: block; &--is-highlighted {