Skip to content

Commit

Permalink
Merge pull request #34 from imagine10255/main
Browse files Browse the repository at this point in the history
add example WithAspectRatio, WithStaticHeight, WithSlidesPerViewAuto
  • Loading branch information
imagine10255 authored Oct 28, 2024
2 parents 472e8e8 + f618e8f commit c01c205
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 15 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,7 @@ jobs:
- name: Install dependencies
run: yarn install

- name: Build Storybook
run: yarn build-storybook

- name: Install Wrangler
run: yarn global add wrangler

- name: Deploy to Cloudflare Pages
run: wrangler pages deploy ./storybook-static --project-name=bear-react-carousel-storybook --branch main
- name: Build Storybook & Deploy to Cloudflare Pages
run: yarn pages:deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [5.1.3](https://github.com/imagine10255/bear-react-carousel/compare/v5.1.3-alpha.0...v5.1.3) (2024-10-27)

### [5.1.3-alpha.0](https://github.com/imagine10255/bear-react-carousel/compare/v5.1.2...v5.1.3-alpha.0) (2024-10-10)

### [5.1.2](https://github.com/imagine10255/bear-react-carousel/compare/v5.1.2-alpha.0...v5.1.2) (2024-09-12)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
- [Components](https://bear-react-carousel.pages.dev/docs/category/components)
- [Features](https://bear-react-carousel.pages.dev/docs/category/feature)
- [Examples](https://bear-react-carousel.pages.dev/docs/category/examples)
- [Storybook](https://bear-react-carousel-storybook.pages.dev)


## Features
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ import { Flex } from '@acrool/react-grid';
import type {Meta, StoryObj} from '@storybook/react';
import BearCarousel, {
BearSlideCard,
TBearSlideItemDataList,
ICarouselState,
Controller,
TOnSlideChange, elClassName
elClassName
} from 'bear-react-carousel';
import {baseImage, bearSlideItemData1} from "../../data";
import {IAspectRatio} from "../../../../../src";


const meta = {
Expand Down Expand Up @@ -64,11 +62,36 @@ export const WithDebug: Story = {
isDebug: true,
}
};
export const WithStaticHeight: Story = {
args: {
slidesPerView: 1,
height: '240px',
}
};
export const WithAspectRatio: Story = {
args: {
slidesPerView: 1,
height: {
widthRatio: 2,
heightRatio: 1,
}
}
};
export const WithSlidesPerView: Story = {
args: {
slidesPerView: 3,
}
};

export const WithSlidesPerViewAuto: Story = {
args: {
slidesPerView: 'auto',
data: baseImage.map(row => {
return <BearSlideCard key={row.id} bgUrl={row.imageUrl} style={{width: '200px', height: '400px'}}/>;
}),
}
};

export const WithSlidesPerGroup: Story = {
args: {
isEnableNavButton: true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bear-react-carousel",
"version": "5.1.3-alpha.0",
"version": "5.1.3",
"description": "Most modern mobile touch slider with hardware accelerated transitions for ReactJS",
"keywords": [
"react",
Expand Down
2 changes: 1 addition & 1 deletion src/BearCarousel.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import {booleanToDataAttr, checkDataFormat, checkIsDesktop, isPropsDiff} from './utils';
import {booleanToDataAttr, isPropsDiff} from './utils';
import logger from './logger';
import {IBearCarouselProps} from './types';
import elClassName from './el-class-name';
Expand Down

0 comments on commit c01c205

Please sign in to comment.