Skip to content

Commit be4eb5f

Browse files
committed
docs: use admonitions styling
1 parent 97a542a commit be4eb5f

File tree

5 files changed

+42
-14
lines changed

5 files changed

+42
-14
lines changed

documentation/docs/examples/easing.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ function Component() {
2222
}
2323
```
2424

25-
**Note:** When defining an `easing` prop like above, ALL provided CSS effects will be eased.
25+
:::important
26+
27+
When defining an `easing` prop like above, ALL provided CSS effects will be eased.
28+
29+
:::
2630

2731
<EasingDemo eased={{ easing: 'easeOutQuad' }} />
2832

documentation/docs/usage/components/parallax-banner-component.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ Component that utilizes `<Parallax>` components to achieve a parallaxing banner
66

77
Use the `layers` to supply a `speed` and `image` to your banner. In this case, it will create a banner using a single image, that moves slower than the rate of scroll, and the edges of the image will never be visible.
88

9-
**NOTE:** You MUST add a `height` value either as a `style` or through a `className` otherwise the banner will have no height and be hidden.
10-
119
```jsx
1210
<ParallaxBanner
1311
layers={[
@@ -22,6 +20,12 @@ Use the `layers` to supply a `speed` and `image` to your banner. In this case, i
2220
/>
2321
```
2422

23+
:::caution
24+
25+
You MUST add a `height` value either as a `style` or through a `className` otherwise the banner will have no height and be hidden.
26+
27+
:::
28+
2529
## Multiple Layers
2630

2731
Supply the `layers` prop with additional configuration for more images. Each layer can contain unique configurations.

documentation/docs/usage/components/parallax-component.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ The main component for applying scroll effects based on an elements position wit
66
import { Parallax } from 'react-scroll-parallax';
77
```
88

9-
# Examples
9+
## Examples
1010

1111
Some basic example of how to use the `<Parallax>` component.
1212

13-
## Speed Control
13+
### Speed Control
1414

1515
The `speed` prop that will make an element's scroll speed appear to speed up or slow down. This is the simplest way to achieve a parallax effect.
1616

@@ -27,9 +27,13 @@ const SlowAndFast = () => (
2727
);
2828
```
2929

30-
**NOTE:** The `speed` prop simplifies the application of a `translateX` or `translateY` effect based on the `ParallaxController` scroll axis – [See <ParallaxProvider\> Props](/docs/usage/components/parallax-provider#parallaxprovider-props)
30+
:::info
3131

32-
## Translate Controls
32+
The `speed` prop simplifies the application of a `translateX` or `translateY` effect based on the `ParallaxController` scroll axis – [See <ParallaxProvider\> Props](/docs/usage/components/parallax-provider#parallaxprovider-props)
33+
34+
:::
35+
36+
### Translate Controls
3337

3438
If you need more fine tune control of the scroll position you can apply start and end transforms more directly. In this example the element begins with a `translateY(-20%)` and ends with `translateY(10%)`
3539

@@ -41,17 +45,21 @@ const TranslateY = () => (
4145
);
4246
```
4347

44-
**NOTE:** Translate values without units default to `%` so `-20` becomes `-20%`.
48+
:::info
49+
50+
Translate values without units default to `%` so `-20` becomes `-20%`.
51+
52+
:::
4553

46-
# Props
54+
## Props
4755

48-
## Props: Effects
56+
### Props: Effects
4957

5058
Most props to configure a parallax element like CSS effects are documented and managed by the `parallax-controller`.
5159

5260
[See all the parallax props](https://parallax-controller.vercel.app/docs/usage/props) that this component will accept.
5361

54-
## Props: Component Configuration
62+
### Props: Component Configuration
5563

5664
The following props allow some configuration of the react component:
5765

documentation/docs/usage/components/parallax-provider.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ const AppContainer = () => (
1818
);
1919
```
2020

21-
**NOTE:** You can have multiple providers, however they will all be independent instances of a `ParallaxController`. It's recommended to only use one when possible.
21+
:::info
22+
23+
You can have multiple providers, however they will all be independent instances of a `ParallaxController`. It's recommended to only use one when possible.
24+
25+
:::
2226

2327
## ParallaxProvider Props
2428

documentation/docs/usage/usage.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ const Component = () => {
3939
};
4040
```
4141

42-
**Note** that the hook will apply the effect styles directly to the element that the `ref` is attached.
42+
:::info
43+
44+
The hook will apply the effect styles directly to the element that the `ref` is attached.
45+
46+
:::
4347

4448
Any of the [documented effects and configurations](https://parallax-controller.vercel.app/docs/usage/props) can be passed as params to the hook.
4549

@@ -57,7 +61,11 @@ const Component = () => (
5761
);
5862
```
5963

60-
**Note** that the component will apply the effect styles to a `div` managed by the component and not the children.
64+
:::info
65+
66+
The component will apply the effect styles to a `div` managed by the component and **not** the children.
67+
68+
:::
6169

6270
Any of the [documented effects and configurations](https://parallax-controller.vercel.app/docs/usage/props) can be passed as props to the component.
6371

0 commit comments

Comments
 (0)