Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

feat: add Slider component #2120

Merged
merged 4 commits into from
Jun 12, 2020
Merged

feat: add Slider component #2120

merged 4 commits into from
Jun 12, 2020

Conversation

goga-m
Copy link
Contributor

@goga-m goga-m commented Jun 12, 2020

Summary

Slider component wrapper over swiper carousel. To be used for wallet cards.

  • Wrapper uses slots (similar to Table component) for custom HTML per slide
  • Extendable configuration in options parameter (see swiper docs)
  • Optional pagination (arrows, dots). Arrows are enabled by default.

2020-06-12-162002_892x544_scrot

Usage:

	const data = [
		{
			coinIcon: "Btc",
			coinClass: "text-theme-warning-400 border-theme-warning-200",
			avatarId: "test",
			address: "ASuusXSW9kfWnicScSgUTjttP6T9GQ3kqT",
			walletName: "My Wallet",
			balance: "100 BTC",
			actions: [
				{
					label: "Action 1",
					value: "1",
				}
			],
		}
                ......
	];

	return (
		<div>
			<div>
				<Slider data={data}>
					{(walletData: any) => (
						<WalletCard {...walletData} onSelect={(selected: any) => console.log(selected)} />
					)}
				</Slider>
			</div>
		</div>
	);

Checklist

  • Documentation (if necessary)
  • Tests (if necessary)
  • Ready to be merged

@goga-m goga-m requested a review from faustbrian as a code owner June 12, 2020 13:21
@ghost ghost added Complexity: High More than 256 lines changed. Type: Feature The issue is a request for new functionality. labels Jun 12, 2020
@codecov
Copy link

codecov bot commented Jun 12, 2020

Codecov Report

Merging #2120 into 3.0-react will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##           3.0-react     #2120    +/-   ##
============================================
  Coverage     100.00%   100.00%            
============================================
  Files             45        75    +30     
  Lines            298       590   +292     
  Branches          49        93    +44     
============================================
+ Hits             298       590   +292     
Flag Coverage Δ
#unit 100.00% <100.00%> (?)
Impacted Files Coverage Δ
src/app/components/Alert/Alert.tsx 100.00% <ø> (ø)
src/app/components/Form/FormLabel.tsx 100.00% <ø> (ø)
src/app/components/Select/Select.tsx 100.00% <ø> (ø)
...app/components/SideBar/SideBarItem/SideBarItem.tsx 100.00% <ø> (ø)
src/domains/settings/pages/Settings/Settings.tsx 100.00% <ø> (ø)
...ings/pages/Settings/available-settings/General.tsx 100.00% <ø> (ø)
...s/wallets/components/MnemonicList/MnemonicList.tsx 100.00% <ø> (ø)
...omains/wallets/pages/ImportWallet/ImportWallet.tsx 100.00% <ø> (ø)
src/app/components/Address/Address.tsx 100.00% <100.00%> (ø)
src/app/components/Address/utils.ts 100.00% <100.00%> (ø)
... and 73 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 10468f0...743c40e. Read the comment docs.

@faustbrian faustbrian merged commit b32ca51 into 3.0-react Jun 12, 2020
@ghost ghost deleted the feat/component-slider branch June 12, 2020 13:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Complexity: High More than 256 lines changed. Type: Feature The issue is a request for new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants