Skip to content

Commit eae00d6

Browse files
authored
fix: feedback ui autocomplete (#75)
1 parent fea2942 commit eae00d6

File tree

7 files changed

+18
-61
lines changed

7 files changed

+18
-61
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@eleven-labs/design-system",
33
"description": "Design System for Eleven Labs",
4-
"version": "0.30.5",
4+
"version": "0.31.0",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/eleven-labs/design-system.git"

src/components/Molecules/Cards/PostCard/PostCard.stories.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ type Story = StoryObj<typeof PostCard>;
1818
export const Overview: Story = {};
1919
Overview.args = {
2020
contentType: 'article',
21-
slug: 'slug',
2221
cover: {
2322
img: {
2423
src: '/imgs/default-cover.jpg',

src/components/Molecules/Cards/PostCard/PostCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ export const postCardVariant = ['highlight-light', 'highlight-dark', 'side-image
1212
export type PostCardVariantType = (typeof postCardVariant)[number];
1313

1414
export interface PostCardProps extends BoxProps {
15+
slug?: string;
1516
contentType?: 'article' | 'tutorial';
1617
variant?: PostCardVariantType;
1718
cover?: PictureProps;
18-
slug?: string;
1919
title?: string;
2020
excerpt?: string;
2121
date?: string;

src/components/Organisms/Autocomplete/Autocomplete.stories.ts

Lines changed: 11 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -25,67 +25,23 @@ export const Overview: Story = {};
2525

2626
export const WithResult: Story = {};
2727
WithResult.args = {
28+
isOpen: true,
2829
defaultValue: 'React',
29-
items: [
30-
{
31-
slug: 'react-ssr',
32-
title: 'React SSR',
33-
date: '24 fév. 2021',
34-
authors: [{ username: 'jdoe', name: 'J. Doe' }],
35-
link: {
36-
href: '#',
37-
},
38-
},
39-
{
40-
slug: 'react-ssg',
41-
title: 'React SSG',
42-
date: '22 fév. 2021',
43-
authors: [{ username: 'jdoe', name: 'J. Doe' }],
44-
link: {
45-
href: '#',
46-
},
47-
},
48-
{
49-
slug: 'react-astro',
50-
title: 'React + Astro',
51-
date: '18 fév. 2021',
52-
authors: [{ username: 'jdoe', name: 'J. Doe' }],
53-
link: {
54-
href: '#',
55-
},
56-
},
57-
{
58-
slug: 'react-nextjs',
59-
title: 'React + NextJS',
60-
date: '16 fév. 2021',
61-
authors: [{ username: 'jdoe', name: 'J. Doe' }],
62-
link: {
63-
href: '#',
64-
},
65-
},
66-
{
67-
slug: 'react-apollo-client',
68-
title: 'React + Apollo Client',
69-
date: '12 fév. 2021',
70-
authors: [{ username: 'jdoe', name: 'J. Doe' }],
71-
link: {
72-
href: '#',
73-
},
74-
},
75-
{
76-
slug: 'react-vs-vue',
77-
title: 'React vs Vue',
78-
date: '09 fév. 2021',
79-
authors: [{ username: 'jdoe', name: 'J. Doe' }],
80-
link: {
81-
href: '#',
82-
},
30+
items: Array.from({ length: 4 }).map((_, index) => ({
31+
slug: `slug-${index}`,
32+
title:
33+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque eget elit turpis. Aliquam sit amet leo mauris vehicula enim id ante aliquam',
34+
date: '24 fév. 2021',
35+
authors: [{ username: 'jdoe', name: 'J. Doe' }],
36+
link: {
37+
href: '#',
8338
},
84-
],
39+
})),
8540
};
8641

8742
export const WithNoResult: Story = {};
8843
WithNoResult.args = {
44+
isOpen: true,
8945
defaultValue: 'React',
9046
items: [],
9147
searchNotFound: {

src/components/Organisms/Autocomplete/AutocompleteResult/AutocompleteResult.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535

3636
&__link {
3737
color: black;
38+
overflow: hidden;
39+
display: -webkit-box;
40+
-webkit-box-orient: vertical;
41+
-webkit-line-clamp: 2;
3842

3943
&::before {
4044
content: " ";

src/components/Organisms/Footer/Footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const Footer: React.FC<FooterProps> = ({
4141
<Flex
4242
flexDirection={{ xs: 'column', md: 'row' }}
4343
justifyContent="center"
44-
alignItems="end"
44+
alignItems={{ xs: 'center', md: 'end' }}
4545
py="m"
4646
bg="primary-very-dark"
4747
className="footer__intro"

src/components/Organisms/Header/Header.stories.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ export const WithMenuIsOpen: Story = {
5656
export const WithAutocompleteIsOpen: Story = {
5757
args: {
5858
autocomplete: {
59-
isOpen: true,
6059
...AutocompleteStories.default.args,
6160
...AutocompleteStories.WithResult.args,
6261
} as HeaderProps['autocomplete'],
@@ -71,7 +70,6 @@ export const WithAutocompleteIsOpen: Story = {
7170
export const WithAutocompleteAndResultNotFound: Story = {
7271
args: {
7372
autocomplete: {
74-
isOpen: true,
7573
...AutocompleteStories.default.args,
7674
...AutocompleteStories.WithNoResult.args,
7775
} as HeaderProps['autocomplete'],

0 commit comments

Comments
 (0)