-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2b3f70b
commit 79e72bd
Showing
17 changed files
with
243 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,8 @@ | |
"consts", | ||
"@reduxjs", | ||
"testid", | ||
"inited" | ||
"inited", | ||
"headlessui" | ||
], | ||
"cSpell.words": [ | ||
"Nothingg" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,7 @@ | |
|
||
// * Card bg | ||
--card-bg: #101557; | ||
|
||
// * ListBox bg | ||
--list-box-bg: #101557; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,7 @@ | |
|
||
// * Card bg | ||
--card-bg: #202074; | ||
|
||
// * ListBox bg | ||
--list-box-bg: #202074; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,7 @@ | |
|
||
// * Card bg | ||
--card-bg: #d3d3d3; | ||
|
||
// * ListBox bg | ||
--list-box-bg: #d3d3d3; | ||
} |
4 changes: 1 addition & 3 deletions
4
src/features/ArticlesList/ui/ArticlesListFilters/ArticlesListFilters.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
.ArticlesListFilters { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 16px; | ||
// padding: 12px; | ||
} | ||
|
||
.sort-filters { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.ListBox { | ||
position: relative; | ||
} | ||
|
||
.trigger { | ||
background: none; | ||
margin: 0; | ||
padding: 0; | ||
outline: none; | ||
border: none; | ||
} | ||
|
||
.options { | ||
position: absolute; | ||
background: var(--list-box-bg); | ||
border-radius: 0 0 12px 12px; | ||
z-index: 20; | ||
width: 100%; | ||
max-width: fit-content; | ||
|
||
&:active { | ||
outline: none; | ||
} | ||
} | ||
|
||
.option { | ||
padding: 10px 20px; | ||
cursor: pointer; | ||
} | ||
|
||
.active { | ||
background: var(--inverted-primary-color); | ||
} | ||
|
||
.disabled { | ||
opacity: .5; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { ListBox } from './ListBox'; | ||
|
||
const meta: Meta<typeof ListBox> = { | ||
title: 'shared/ListBox', | ||
component: ListBox, | ||
tags: ['autodocs'], | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof ListBox>; | ||
|
||
export const Root: Story = { | ||
args: { | ||
options: [ | ||
{ | ||
content: 'First option label', | ||
value: 'First option value', | ||
}, | ||
{ | ||
content: 'Second option label', | ||
value: 'Second option value', | ||
}, | ||
{ | ||
content: 'Third option label', | ||
value: 'Third option value', | ||
}, | ||
], | ||
}, | ||
}; | ||
|
||
export const WithDisabledOption: Story = { | ||
args: { | ||
options: [ | ||
{ | ||
content: 'First label', | ||
value: 'First value', | ||
}, | ||
{ | ||
content: 'Second label', | ||
value: 'Second value', | ||
disabled: true, | ||
}, | ||
{ | ||
content: 'Third label', | ||
value: 'Third value', | ||
}, | ||
], | ||
}, | ||
}; |
Oops, something went wrong.