Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 11 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog][Keep a Changelog] and this project adheres to [Semantic Versioning][Semantic Versioning].

## [3.4.3] - *Apr 25 2025*

### Removed

* Remove no needed `@mui/styles` reference from README.md. ([@itsmeurbi])


## [3.4.0 - 3.4.2] - *May 28 2022*

### Fixed
Expand Down Expand Up @@ -42,7 +49,7 @@ The format is based on [Keep a Changelog][Keep a Changelog] and this project adh

* Converted makeStyles into using styled helper ([@matyas-igor])
* Updated the file structure to be more readable ([@Learus])
* **(Breaking)** Added `@mui/system` as peer dependency.
* **(Breaking)** Added `@mui/system` as peer dependency.
* *Reason*: The newly added `sx` prop is of type `SxProps` imported from `@mui/system`.

### Removed
Expand All @@ -61,7 +68,7 @@ This version is unpublished. Its changes are moving to version 3.2.0 among other

## [3.0.0] - *Oct 28 2021*

:fireworks::fire: React Material Ui Carousel has been fully refactored to use more modern react techniques such as hooks, functional components and other cool stuff. :fire::fireworks:
:fireworks::fire: React Material Ui Carousel has been fully refactored to use more modern react techniques such as hooks, functional components and other cool stuff. :fire::fireworks:
In general, its usage does not change.

### Changed
Expand Down Expand Up @@ -215,4 +222,5 @@ In general, its usage does not change.
[@8BitAron]: https://github.com/8BitAron
[@hamidreza-nateghi]: https://github.com/hamidreza-nateghi
[@hajineats]: https://github.com/hajineats
[@aveloso4]: https://github.com/aveloso4
[@aveloso4]: https://github.com/aveloso4
[@itsmeurbi]: https://github.com/itsmeurbi
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Description

A Generic, extendible Carousel UI component for React using [Material UI](https://material-ui.com/)
It switches between given children using a smooth animation.
A Generic, extendible Carousel UI component for React using [Material UI](https://material-ui.com/)
It switches between given children using a smooth animation.
Provides next and previous buttons.
Also provides interactible bullet indicators.

Expand All @@ -24,7 +24,6 @@ You will need to have Material UI installed, in order to use this library/compon
```shell
npm install @mui/material
npm install @mui/icons-material
npm install @mui/styles
```

### Other Versions
Expand Down Expand Up @@ -145,7 +144,7 @@ The `NextIcon` and `PrevIcon` is of type `ReactNode`, meaning it can be any JSX

#### Example #2

Let's now say we don't like the default graphite background of the buttons, nor do we like the fact that it is round.
Let's now say we don't like the default graphite background of the buttons, nor do we like the fact that it is round.
We also want to place them under the main Carousel, and finally remove the arrows and have "next" and "prev" accordingly to each button.

A very important note here, is that any styles specified by the user **DO NOT OVERRIDE THE EXISTING STYLES**. They work in tandem with them. That means, that if you want to change, or get rid of a CSS attribute you will have to override it or unset it. The [Default styles](#default-styles) are given at the end of this section, and are part of the code.
Expand All @@ -158,13 +157,13 @@ A very important note here, is that any styles specified by the user **DO NOT OV
backgroundColor: 'cornflowerblue',
borderRadius: 0
}
}}
}}
navButtonsWrapperProps={{ // Move the buttons to the bottom. Unsetting top here to override default style.
style: {
bottom: '0',
top: 'unset'
}
}}
}}
NextIcon='next' // Change the "inside" of the next button to "next"
PrevIcon='prev' // Change the "inside of the prev button to "prev"
>
Expand Down Expand Up @@ -207,7 +206,7 @@ import {Button} from '@mui/material';
* `next`: Boolean value that specifies whether this is the next button.
* `prev`: Boolean value that specifies whether this is the prev button.

The prop value must be a function that returns a component. All parameters are optional as far as styling goes (**not functionality**), but it is advised you use them as shown above.
The prop value must be a function that returns a component. All parameters are optional as far as styling goes (**not functionality**), but it is advised you use them as shown above.
As implied, any `className`s or `style`s specified in the navButtonsProps will only be used iff you apply the given `className` and `style` parameters.

### Customizing the Indicators
Expand Down Expand Up @@ -241,10 +240,10 @@ The `IndicatorIcon` works the same way as the `NextIcon` and `PrevIcon` prop.
#### Example #2

Let's say we would like to have an array to icons like numbers, to order the elements of my carousel numerically. Let's do this!

```jsx
const anArrayOfNumbers = [<img src="http://random.com/one"/>,
<img src="http://random.com/two"/>,
const anArrayOfNumbers = [<img src="http://random.com/one"/>,
<img src="http://random.com/two"/>,
<img src="http://random.com/three"/>
];

Expand Down Expand Up @@ -377,7 +376,7 @@ Giving the default styles in pseudo-code.
fontSize: "15px",
},
// Applies to the active indicator
active: {
active: {
color: "#494949"
}
}
Expand Down