Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated carousel docs. #1675

Merged
merged 39 commits into from
Nov 22, 2023
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
ab2a943
updating carousel docs.
siddhantrawal Nov 6, 2023
2faab58
moving props back to original place.
siddhantrawal Nov 6, 2023
6498fb9
Updated Carousel.DotsList text.
siddhantrawal Nov 6, 2023
0bded06
updated subcomponets text.
siddhantrawal Nov 6, 2023
44b5dd8
Merge branch 'siddhant/update_carousel_docs' of https://github.com/iT…
siddhantrawal Nov 6, 2023
9f2cff3
updated text.
siddhantrawal Nov 7, 2023
e141ca8
Fixed comments.
siddhantrawal Nov 7, 2023
57033cd
Updated controlled state text.
siddhantrawal Nov 8, 2023
09f001d
Fixed comment related to adding info about order.
siddhantrawal Nov 8, 2023
b33f1ad
Merge branch 'siddhant/update_carousel_docs' of https://github.com/iT…
siddhantrawal Nov 8, 2023
c805eaf
Added important paragraph.
siddhantrawal Nov 8, 2023
65d864d
Updated Carousel component text.
siddhantrawal Nov 9, 2023
66c7052
Updated and rearranged text related to comments,
siddhantrawal Nov 13, 2023
8926ddd
Merge branch 'siddhant/update_carousel_docs' of https://github.com/iT…
siddhantrawal Nov 13, 2023
6f8948f
Merge branch 'main' into siddhant/update_carousel_docs
siddhantrawal Nov 15, 2023
bec7c1f
Merge branch 'main' into siddhant/update_carousel_docs
siddhantrawal Nov 16, 2023
03dfeb4
Updated Carousel.DotsList text.
siddhantrawal Nov 16, 2023
b53ce01
updated carousel main text.
siddhantrawal Nov 16, 2023
ef86b34
updated subcomponents text.
siddhantrawal Nov 16, 2023
524a65d
Moved carousel props to bottom?
siddhantrawal Nov 16, 2023
eb6fc67
Merge branch 'main' into siddhant/update_carousel_docs
siddhantrawal Nov 17, 2023
940ffe8
Merge branch 'main' into siddhant/update_carousel_docs
siddhantrawal Nov 20, 2023
8a7bf2c
Update accessibility text.
siddhantrawal Nov 20, 2023
dc75acc
Updating subcomponents text.
siddhantrawal Nov 20, 2023
46ce266
removed onlyDots example and heading.
siddhantrawal Nov 20, 2023
0a3ec6b
Added static example.
siddhantrawal Nov 20, 2023
1bd6e58
removed props heading & shifted accessibility section.
siddhantrawal Nov 20, 2023
aff0b29
removed placeholder import.
siddhantrawal Nov 21, 2023
4d0026c
Updated fragment links.
siddhantrawal Nov 21, 2023
8d6d4fb
replacing propspath variable to inline.
siddhantrawal Nov 21, 2023
b907ae6
moving text under carousel and usage sub heading,
siddhantrawal Nov 21, 2023
d364d81
text moved related to comments.
siddhantrawal Nov 21, 2023
80207ef
Updated Carousel.DotsList Text.
siddhantrawal Nov 21, 2023
10a70f4
Added sub heading for previous and next button.
siddhantrawal Nov 21, 2023
44154fb
Added fragment link for Carousel.Slide.
siddhantrawal Nov 21, 2023
be6e036
Added fragment link for Carousel.Dot
siddhantrawal Nov 21, 2023
230c304
Updated link for navigation heading.
siddhantrawal Nov 21, 2023
73bc974
Updated Carousel.Dot text.
siddhantrawal Nov 21, 2023
5e5a0b6
updated jsdocs.
siddhantrawal Nov 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions apps/website/src/pages/docs/carousel.mdx
mayank99 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import * as AllExamples from 'examples';

<p>{frontmatter.description}</p>

<Placeholder componentPageName='core--carousel' />

<LiveExample src='Carousel.main.tsx'>
<AllExamples.CarouselMainExample client:load />
</LiveExample>
Expand All @@ -27,24 +25,22 @@ The currently shown slide can also be changed using the left/right arrow keys or

## Usage
r100-stack marked this conversation as resolved.
Show resolved Hide resolved
mayank99 marked this conversation as resolved.
Show resolved Hide resolved

### Controlled State

Carousels can be controlled externally by using the properties `activeSlideIndex` and `onSlideChange`.
r100-stack marked this conversation as resolved.
Show resolved Hide resolved

<LiveExample src='Carousel.controlled.tsx'>
<AllExamples.CarouselControlledExample client:load />
</LiveExample>

The subcomponents can be used outside of Carousel. The following example shows how `Carousel.DotsList` can be used without the `Carousel` component. Clicking on the right half of the slide will advance the carousel to the next slide, whereas clicking on the left half will go to the previous slide.
### Only Dots

`Carousel.DotsList` can be used without the `Carousel` component. Clicking on the right half of the slide will advance the carousel to the next slide, whereas clicking on the left half will go to the previous slide.
siddhantrawal marked this conversation as resolved.
Show resolved Hide resolved

<LiveExample src='Carousel.onlyDots.tsx'>
<AllExamples.CarouselOnlyDotsExample client:load />
</LiveExample>
mayank99 marked this conversation as resolved.
Show resolved Hide resolved

## Props
r100-stack marked this conversation as resolved.
Show resolved Hide resolved

Properties table is to be defined.

<PropsTable path={frontmatter.propsPath} />

## Subcomponents

This component uses a composition approach so it should be used with the provided subcomponents.
r100-stack marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -76,3 +72,9 @@ The `Carousel.DotsList` component shows a list of `Carousel.Dot` components whic
`Carousel.Dot` is the actual "dot" component used to activate a slide on clicking. It should be used as a child of `Carousel.Dots`.
mayank99 marked this conversation as resolved.
Show resolved Hide resolved

<PropsTable path={'@itwin/itwinui-react/esm/core/Carousel/CarouselDot.d.ts'} />

## Props

Properties table is to be defined.

<PropsTable path={frontmatter.propsPath} />