-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix useLazyLoadBg not disconnect observe
- Loading branch information
1 parent
d6cf41d
commit 35c7648
Showing
12 changed files
with
309 additions
and
171 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
56 changes: 56 additions & 0 deletions
56
example/src/components/primary/BearSlideCard/BearSlideCard.stories.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,56 @@ | ||
import type {Meta, StoryObj} from '@storybook/react'; | ||
import BearCarousel, { | ||
TBearSlideItemDataList, | ||
BearSlideCard | ||
} from 'bear-react-carousel'; | ||
import {generatorBearSlideCardData, generatorBearSlideImageData} from "../../data"; | ||
|
||
|
||
const meta = { | ||
title: 'Primary/BearSlideCard', | ||
component: BearSlideCard, | ||
parameters: { | ||
layout: 'centered', | ||
actions: {argTypesRegex: '^on.*'}, | ||
docs: { | ||
description: { | ||
component: 'Slide item component use div css background-image' | ||
}, | ||
}, | ||
}, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
args: { | ||
bgSize: '100%' // '100%'|'cover'|'contain' | ||
}, | ||
render: function Render(args) { | ||
|
||
const bearSlideItemData1: TBearSlideItemDataList = generatorBearSlideCardData(args); | ||
|
||
return <BearCarousel | ||
data={bearSlideItemData1} | ||
height="300px" | ||
/>; | ||
}, | ||
} satisfies Meta<typeof BearSlideCard>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
|
||
|
||
|
||
export const Primary: Story = { | ||
args: { | ||
} | ||
}; | ||
export const WithCover: Story = { | ||
args: { | ||
bgSize: 'cover' | ||
} | ||
}; | ||
export const WithContain: Story = { | ||
args: { | ||
bgSize: 'contain' | ||
} | ||
}; |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.