-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(atomic): add segmented scrollable component basic structure (#2100)
* basic structure https://coveord.atlassian.net/browse/KIT-1722 * draft (doesn't work) https://coveord.atlassian.net/browse/KIT-1722 * add index example, use slot https://coveord.atlassian.net/browse/KIT-1722 * styling shadowroot attempt https://coveord.atlassian.net/browse/KIT-1722 * css for segmented scrollable https://coveord.atlassian.net/browse/KIT-1722 * arrow buttons added https://coveord.atlassian.net/browse/KIT-1722 * adjusted height https://coveord.atlassian.net/browse/KIT-1722 * changed from clickable div to button https://coveord.atlassian.net/browse/KIT-1722 * removed comments https://coveord.atlassian.net/browse/KIT-1722 Co-authored-by: Jean-Félix Thibodeau <[email protected]>
- Loading branch information
1 parent
f4bb50a
commit 7bb2d1c
Showing
9 changed files
with
88 additions
and
2 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
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
9 changes: 9 additions & 0 deletions
9
...omponents/facets/atomic-segmented-facet-scrollable/atomic-segmented-facet-scrollable.pcss
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,9 @@ | ||
@import '../../../global/global.pcss'; | ||
|
||
.wrapper-segmented { | ||
-ms-overflow-style: none; /* Internet Explorer 10+ */ | ||
scrollbar-width: none; /* Firefox */ | ||
} | ||
.wrapper-segmented::-webkit-scrollbar { | ||
display: none; /* Safari and Chrome */ | ||
} |
37 changes: 37 additions & 0 deletions
37
...components/facets/atomic-segmented-facet-scrollable/atomic-segmented-facet-scrollable.tsx
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 @@ | ||
import {Component, Element, h} from '@stencil/core'; | ||
import ArrowRightIcon from 'coveo-styleguide/resources/icons/svg/arrow-right-rounded.svg'; | ||
import ArrowLeftIcon from 'coveo-styleguide/resources/icons/svg/arrow-left-rounded.svg'; | ||
import {Button} from '../../common/button'; | ||
|
||
@Component({ | ||
tag: 'atomic-segmented-facet-scrollable', | ||
styleUrl: 'atomic-segmented-facet-scrollable.pcss', | ||
shadow: true, | ||
}) | ||
export class AtomicSegmentedFacetScrollable { | ||
@Element() private host!: HTMLElement; | ||
|
||
render() { | ||
return ( | ||
<div class="flex h-9"> | ||
<Button | ||
style="square-neutral" | ||
class="flex shrink-0 basis-8 justify-center items-center rounded" | ||
ariaHidden="true" | ||
> | ||
<atomic-icon class="w-3.5" icon={ArrowLeftIcon}></atomic-icon> | ||
</Button> | ||
<div class="wrapper-segmented flex flex-row overflow-x-scroll"> | ||
<slot></slot> | ||
</div> | ||
<Button | ||
style="square-neutral" | ||
class="flex shrink-0 basis-8 justify-center items-center rounded" | ||
ariaHidden="true" | ||
> | ||
<atomic-icon class="w-3.5" icon={ArrowRightIcon}></atomic-icon> | ||
</Button> | ||
</div> | ||
); | ||
} | ||
} |
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