Skip to content

Commit

Permalink
add overflow to file list
Browse files Browse the repository at this point in the history
  • Loading branch information
rachelbt committed Dec 1, 2024
1 parent ad5aa29 commit d4b5cbb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions libs/components/src/lib/file-picker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,11 @@ The `helper-text` slot allows you to use rich content as the file picker's helpe
Each added file in the preview list has a default background-color of `vvd-color-canvas` (`#fff` in light theme, `#000` in dark).
If needed, the background of the item can be changed using the `--file-picker-list-item-background-color` CSS variable.

### file-picker-list-block-size
## Dimensions

Use `--file-picker-list-block-size` the set the max-block-size of list of the added files, other than `408px`.
### Block-Size

When setting `block-size` or `max-block-size` on the file-picker the list of the added files will have auto scroll.

## Properties

Expand Down
2 changes: 1 addition & 1 deletion libs/components/src/lib/file-picker/file-picker.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ $low-ink-color: --_low-ink-color;
.base {
display: flex;
flex-direction: column;
max-block-size: inherit;
}

.control {
Expand Down Expand Up @@ -137,7 +138,6 @@ $low-ink-color: --_low-ink-color;
flex-direction: column;
gap: 12px;
margin-block-start: 12px;
max-block-size: var(variables.$file-picker-list-block-size, 408px);
overflow-y: auto;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
$file-picker-list-item-background-color: --file-picker-list-item-background-color;
$file-picker-list-block-size: --file-picker-list-block-size;

0 comments on commit d4b5cbb

Please sign in to comment.