@utilitywarehouse/hearth-react-native 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.ts +12 -6
- package/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-lint.log +1 -1
- package/CHANGELOG.md +18 -0
- package/build/components/Banner/Banner.d.ts +6 -0
- package/build/components/Banner/Banner.js +161 -0
- package/build/components/Banner/Banner.props.d.ts +82 -0
- package/build/components/Banner/Banner.props.js +1 -0
- package/build/components/Banner/index.d.ts +2 -0
- package/build/components/Banner/index.js +1 -0
- package/build/components/BottomSheet/BottomSheetBackdrop.js +1 -5
- package/build/components/BottomSheet/BottomSheetFlatList.js +1 -5
- package/build/components/BottomSheet/BottomSheetHandle.js +1 -5
- package/build/components/BottomSheet/useBottomSheetLogic.d.ts +1 -1
- package/build/components/Button/ButtonIcon.js +2 -1
- package/build/components/Button/ButtonRoot.js +2 -6
- package/build/components/Button/ButtonText.js +4 -1
- package/build/components/Card/Card.context.d.ts +7 -0
- package/build/components/Card/CardAction/CardAction.context.d.ts +9 -0
- package/build/components/Card/{CardAction.context.js → CardAction/CardAction.context.js} +7 -1
- package/build/components/Card/CardAction/CardAction.d.ts +18 -0
- package/build/components/Card/CardAction/CardAction.js +7 -0
- package/build/components/Card/CardAction/CardAction.props.d.ts +63 -0
- package/build/components/Card/CardAction/CardAction.props.js +1 -0
- package/build/components/Card/CardAction/CardActionContent.d.ts +6 -0
- package/build/components/Card/CardAction/CardActionContent.js +13 -0
- package/build/components/Card/CardAction/CardActionHelperText.d.ts +6 -0
- package/build/components/Card/CardAction/CardActionHelperText.js +13 -0
- package/build/components/Card/CardAction/CardActionIcon.d.ts +9 -0
- package/build/components/Card/CardAction/CardActionIcon.js +19 -0
- package/build/components/Card/CardAction/CardActionLeadingContent.d.ts +6 -0
- package/build/components/Card/CardAction/CardActionLeadingContent.js +5 -0
- package/build/components/Card/CardAction/CardActionRoot.d.ts +12 -0
- package/build/components/Card/CardAction/CardActionRoot.js +155 -0
- package/build/components/Card/CardAction/CardActionText.d.ts +6 -0
- package/build/components/Card/CardAction/CardActionText.js +9 -0
- package/build/components/Card/CardAction/CardActionTrailingContent.d.ts +6 -0
- package/build/components/Card/CardAction/CardActionTrailingContent.js +5 -0
- package/build/components/Card/CardAction/CardActionTrailingIcon.d.ts +9 -0
- package/build/components/Card/CardAction/CardActionTrailingIcon.js +19 -0
- package/build/components/Card/CardAction/index.d.ts +10 -0
- package/build/components/Card/CardAction/index.js +9 -0
- package/build/components/Card/CardContent.d.ts +6 -0
- package/build/components/Card/CardContent.js +33 -0
- package/build/components/Card/CardPressHandler.context.d.ts +6 -0
- package/build/components/Card/CardPressHandler.context.js +6 -0
- package/build/components/Card/{CardAction.d.ts → CardPressHandler.d.ts} +3 -3
- package/build/components/Card/CardPressHandler.js +13 -0
- package/build/components/Card/CardRoot.js +103 -11
- package/build/components/Card/index.d.ts +3 -2
- package/build/components/Card/index.js +3 -2
- package/build/components/Checkbox/CheckboxIcon.js +2 -1
- package/build/components/Container/Container.js +3 -3
- package/build/components/CurrencyInput/CurrencyInput.js +1 -1
- package/build/components/Expandable/Expandable.d.ts +6 -0
- package/build/components/Expandable/Expandable.js +44 -0
- package/build/components/Expandable/Expandable.props.d.ts +38 -0
- package/build/components/Expandable/Expandable.props.js +1 -0
- package/build/components/Expandable/index.d.ts +2 -0
- package/build/components/Expandable/index.js +1 -0
- package/build/components/ExpandableCard/ExpandableCard.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCard.js +23 -0
- package/build/components/ExpandableCard/ExpandableCard.props.d.ts +69 -0
- package/build/components/ExpandableCard/ExpandableCard.props.js +1 -0
- package/build/components/ExpandableCard/ExpandableCardContent.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCardContent.js +14 -0
- package/build/components/ExpandableCard/ExpandableCardExpandedContent.d.ts +11 -0
- package/build/components/ExpandableCard/ExpandableCardExpandedContent.js +18 -0
- package/build/components/ExpandableCard/ExpandableCardGroup.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCardGroup.js +17 -0
- package/build/components/ExpandableCard/ExpandableCardGroup.props.d.ts +25 -0
- package/build/components/ExpandableCard/ExpandableCardGroup.props.js +1 -0
- package/build/components/ExpandableCard/ExpandableCardHelperText.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCardHelperText.js +13 -0
- package/build/components/ExpandableCard/ExpandableCardIcon.d.ts +9 -0
- package/build/components/ExpandableCard/ExpandableCardIcon.js +19 -0
- package/build/components/ExpandableCard/ExpandableCardLeadingContent.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCardLeadingContent.js +5 -0
- package/build/components/ExpandableCard/ExpandableCardText.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCardText.js +7 -0
- package/build/components/ExpandableCard/ExpandableCardTrailingContent.d.ts +6 -0
- package/build/components/ExpandableCard/ExpandableCardTrailingContent.js +5 -0
- package/build/components/ExpandableCard/ExpandableCardTrailingIcon.d.ts +9 -0
- package/build/components/ExpandableCard/ExpandableCardTrailingIcon.js +17 -0
- package/build/components/ExpandableCard/ExpandableCardTrigger.d.ts +17 -0
- package/build/components/ExpandableCard/ExpandableCardTrigger.js +7 -0
- package/build/components/ExpandableCard/ExpandableCardTrigger.props.d.ts +44 -0
- package/build/components/ExpandableCard/ExpandableCardTrigger.props.js +1 -0
- package/build/components/ExpandableCard/ExpandableCardTriggerRoot.d.ts +11 -0
- package/build/components/ExpandableCard/ExpandableCardTriggerRoot.js +91 -0
- package/build/components/ExpandableCard/index.d.ts +14 -0
- package/build/components/ExpandableCard/index.js +11 -0
- package/build/components/Helper/HelperIcon.js +2 -1
- package/build/components/HighlightBanner/HighlightBanner.d.ts +6 -0
- package/build/components/HighlightBanner/HighlightBanner.js +86 -0
- package/build/components/HighlightBanner/HighlightBanner.props.d.ts +14 -0
- package/build/components/HighlightBanner/HighlightBanner.props.js +1 -0
- package/build/components/HighlightBanner/index.d.ts +2 -0
- package/build/components/HighlightBanner/index.js +1 -0
- package/build/components/Icon/Icon.d.ts +2 -6
- package/build/components/IconButton/IconButtonIcon.js +2 -1
- package/build/components/IconContainer/IconContainer.d.ts +4 -3
- package/build/components/IconContainer/IconContainer.js +3 -3
- package/build/components/Input/InputField.js +4 -2
- package/build/components/Input/InputIcon.js +2 -1
- package/build/components/Link/LinkIcon.js +3 -2
- package/build/components/List/ListAction/ListActionTrailingIcon.js +2 -1
- package/build/components/List/ListItem/ListItemIcon.js +2 -1
- package/build/components/List/ListItem/ListItemTrailingIcon.js +2 -3
- package/build/components/Radio/RadioIcon.js +7 -2
- package/build/components/RadioCard/RadioCardIcon.js +3 -2
- package/build/components/Spinner/Spinner.web.d.ts +2 -1
- package/build/components/Switch/Switch.js +5 -3
- package/build/components/Textarea/TextareaField.js +1 -1
- package/build/components/ToggleButton/ToggleButtonIcon.js +2 -1
- package/build/components/ToggleButton/ToggleButtonRoot.js +2 -2
- package/build/components/UnstyledIconButton/UnstyledIconButtonIcon.js +2 -1
- package/build/components/index.d.ts +5 -1
- package/build/components/index.js +5 -1
- package/build/core/index.d.ts +3 -3
- package/build/core/index.js +3 -3
- package/build/core/themes.d.ts +24 -12
- package/build/hooks/useColorMode.d.ts +1 -1
- package/build/hooks/useColorMode.js +7 -8
- package/build/tokens/components/dark/banner.d.ts +19 -0
- package/build/tokens/components/dark/banner.js +19 -0
- package/build/tokens/components/dark/card-action.d.ts +11 -0
- package/build/tokens/components/dark/card-action.js +10 -0
- package/build/tokens/components/dark/card-content.d.ts +25 -0
- package/build/tokens/components/dark/card-content.js +24 -0
- package/build/tokens/components/dark/drawer.d.ts +29 -0
- package/build/tokens/components/dark/drawer.js +28 -0
- package/build/tokens/components/dark/illustrations.d.ts +0 -1
- package/build/tokens/components/dark/illustrations.js +0 -1
- package/build/tokens/components/dark/index.d.ts +3 -0
- package/build/tokens/components/dark/index.js +3 -0
- package/build/tokens/components/light/banner.d.ts +19 -0
- package/build/tokens/components/light/banner.js +19 -0
- package/build/tokens/components/light/card-action.d.ts +11 -0
- package/build/tokens/components/light/card-action.js +10 -0
- package/build/tokens/components/light/card-content.d.ts +25 -0
- package/build/tokens/components/light/card-content.js +24 -0
- package/build/tokens/components/light/drawer.d.ts +29 -0
- package/build/tokens/components/light/drawer.js +28 -0
- package/build/tokens/components/light/illustrations.d.ts +0 -1
- package/build/tokens/components/light/illustrations.js +0 -1
- package/build/tokens/components/light/index.d.ts +3 -0
- package/build/tokens/components/light/index.js +3 -0
- package/build/tokens/layout.d.ts +6 -6
- package/build/tokens/layout.js +3 -3
- package/build/tokens/typography.d.ts +6 -0
- package/build/tokens/typography.js +3 -0
- package/docs/components/AllComponents.web.tsx +75 -4
- package/docs/components/NextPrevPage.tsx +5 -5
- package/docs/components/VariantTitle.tsx +17 -7
- package/package.json +16 -14
- package/src/components/Banner/Banner.docs.mdx +402 -0
- package/src/components/Banner/Banner.props.ts +106 -0
- package/src/components/Banner/Banner.stories.tsx +494 -0
- package/src/components/Banner/Banner.tsx +264 -0
- package/src/components/Banner/index.ts +2 -0
- package/src/components/BottomSheet/BottomSheetBackdrop.tsx +1 -2
- package/src/components/BottomSheet/BottomSheetFlatList.tsx +1 -3
- package/src/components/BottomSheet/BottomSheetHandle.tsx +0 -1
- package/src/components/Button/ButtonIcon.tsx +2 -1
- package/src/components/Button/ButtonRoot.tsx +2 -6
- package/src/components/Button/ButtonText.tsx +4 -1
- package/src/components/Card/Card.context.ts +7 -0
- package/src/components/Card/Card.docs.mdx +221 -15
- package/src/components/Card/Card.stories.tsx +50 -3
- package/src/components/Card/CardAction/CardAction.context.ts +22 -0
- package/src/components/Card/CardAction/CardAction.props.ts +87 -0
- package/src/components/Card/CardAction/CardAction.stories.tsx +265 -0
- package/src/components/Card/CardAction/CardAction.tsx +10 -0
- package/src/components/Card/CardAction/CardActionContent.tsx +20 -0
- package/src/components/Card/CardAction/CardActionHelperText.tsx +21 -0
- package/src/components/Card/CardAction/CardActionIcon.tsx +32 -0
- package/src/components/Card/CardAction/CardActionLeadingContent.tsx +9 -0
- package/src/components/Card/CardAction/CardActionRoot.tsx +258 -0
- package/src/components/Card/CardAction/CardActionText.tsx +17 -0
- package/src/components/Card/CardAction/CardActionTrailingContent.tsx +9 -0
- package/src/components/Card/CardAction/CardActionTrailingIcon.tsx +32 -0
- package/src/components/Card/CardAction/index.ts +10 -0
- package/src/components/Card/CardContent.tsx +40 -0
- package/src/components/Card/CardPressHandler.context.ts +12 -0
- package/src/components/Card/CardPressHandler.tsx +20 -0
- package/src/components/Card/CardRoot.tsx +128 -13
- package/src/components/Card/index.ts +3 -2
- package/src/components/Checkbox/CheckboxIcon.tsx +2 -1
- package/src/components/Container/Container.tsx +3 -3
- package/src/components/CurrencyInput/CurrencyInput.tsx +1 -1
- package/src/components/Expandable/Expandable.docs.mdx +201 -0
- package/src/components/Expandable/Expandable.props.ts +46 -0
- package/src/components/Expandable/Expandable.stories.tsx +284 -0
- package/src/components/Expandable/Expandable.tsx +92 -0
- package/src/components/Expandable/index.ts +2 -0
- package/src/components/ExpandableCard/ExpandableCard.docs.mdx +312 -0
- package/src/components/ExpandableCard/ExpandableCard.props.ts +85 -0
- package/src/components/ExpandableCard/ExpandableCard.stories.tsx +326 -0
- package/src/components/ExpandableCard/ExpandableCard.tsx +76 -0
- package/src/components/ExpandableCard/ExpandableCardContent.tsx +21 -0
- package/src/components/ExpandableCard/ExpandableCardExpandedContent.tsx +42 -0
- package/src/components/ExpandableCard/ExpandableCardGroup.props.ts +31 -0
- package/src/components/ExpandableCard/ExpandableCardGroup.tsx +40 -0
- package/src/components/ExpandableCard/ExpandableCardHelperText.tsx +21 -0
- package/src/components/ExpandableCard/ExpandableCardIcon.tsx +32 -0
- package/src/components/ExpandableCard/ExpandableCardLeadingContent.tsx +9 -0
- package/src/components/ExpandableCard/ExpandableCardText.tsx +14 -0
- package/src/components/ExpandableCard/ExpandableCardTrailingContent.tsx +9 -0
- package/src/components/ExpandableCard/ExpandableCardTrailingIcon.tsx +30 -0
- package/src/components/ExpandableCard/ExpandableCardTrigger.props.ts +47 -0
- package/src/components/ExpandableCard/ExpandableCardTrigger.tsx +10 -0
- package/src/components/ExpandableCard/ExpandableCardTriggerRoot.tsx +154 -0
- package/src/components/ExpandableCard/index.ts +14 -0
- package/src/components/Helper/HelperIcon.tsx +2 -1
- package/src/components/HighlightBanner/HighlightBanner.docs.mdx +277 -0
- package/src/components/HighlightBanner/HighlightBanner.props.ts +29 -0
- package/src/components/HighlightBanner/HighlightBanner.stories.tsx +259 -0
- package/src/components/HighlightBanner/HighlightBanner.tsx +122 -0
- package/src/components/HighlightBanner/index.ts +2 -0
- package/src/components/Icon/Icon.tsx +4 -3
- package/src/components/IconButton/IconButtonIcon.tsx +2 -1
- package/src/components/IconContainer/IconContainer.tsx +17 -19
- package/src/components/Input/InputField.tsx +2 -1
- package/src/components/Input/InputIcon.tsx +2 -1
- package/src/components/Link/LinkIcon.tsx +3 -2
- package/src/components/List/ListAction/ListActionTrailingIcon.tsx +2 -1
- package/src/components/List/ListItem/ListItemIcon.tsx +2 -1
- package/src/components/List/ListItem/ListItemTrailingIcon.tsx +2 -3
- package/src/components/Radio/RadioIcon.tsx +8 -3
- package/src/components/RadioCard/RadioCardIcon.tsx +4 -3
- package/src/components/Switch/Switch.tsx +10 -5
- package/src/components/Switch/Switch.web.tsx +1 -0
- package/src/components/Textarea/TextareaField.tsx +1 -1
- package/src/components/ToggleButton/ToggleButtonIcon.tsx +2 -1
- package/src/components/ToggleButton/ToggleButtonRoot.tsx +2 -2
- package/src/components/UnstyledIconButton/UnstyledIconButtonIcon.tsx +2 -1
- package/src/components/index.ts +5 -9
- package/src/core/index.ts +14 -11
- package/src/hooks/useColorMode.ts +9 -12
- package/src/tokens/components/dark/banner.ts +19 -0
- package/src/tokens/components/dark/card-action.ts +11 -0
- package/src/tokens/components/dark/card-content.ts +25 -0
- package/src/tokens/components/dark/drawer.ts +29 -0
- package/src/tokens/components/dark/illustrations.ts +0 -1
- package/src/tokens/components/dark/index.ts +3 -0
- package/src/tokens/components/light/banner.ts +19 -0
- package/src/tokens/components/light/card-action.ts +11 -0
- package/src/tokens/components/light/card-content.ts +25 -0
- package/src/tokens/components/light/drawer.ts +29 -0
- package/src/tokens/components/light/illustrations.ts +0 -1
- package/src/tokens/components/light/index.ts +3 -0
- package/src/tokens/layout.ts +3 -3
- package/src/tokens/typography.ts +3 -0
- package/build/components/Card/CardAction.context.d.ts +0 -6
- package/build/components/Card/CardAction.js +0 -13
- package/src/components/Card/CardAction.context.ts +0 -12
- package/src/components/Card/CardAction.tsx +0 -18
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-native';
|
|
2
|
+
import {
|
|
3
|
+
BroadbandMediumIcon,
|
|
4
|
+
CashbackCardMediumIcon,
|
|
5
|
+
ElectricityMediumIcon,
|
|
6
|
+
InsuranceMediumIcon,
|
|
7
|
+
MobileMediumIcon,
|
|
8
|
+
} from '@utilitywarehouse/hearth-react-native-icons';
|
|
9
|
+
import SpotBillingDark from '@utilitywarehouse/hearth-svg-assets/lib/spot-billing-dark.svg';
|
|
10
|
+
import SpotBillingLight from '@utilitywarehouse/hearth-svg-assets/lib/spot-billing-light.svg';
|
|
11
|
+
import { View } from 'react-native';
|
|
12
|
+
import { Button } from '../Button';
|
|
13
|
+
import { Flex } from '../Flex';
|
|
14
|
+
import { Link } from '../Link';
|
|
15
|
+
import Banner from './Banner';
|
|
16
|
+
|
|
17
|
+
const meta = {
|
|
18
|
+
title: 'Stories / Banner',
|
|
19
|
+
component: Banner,
|
|
20
|
+
parameters: {
|
|
21
|
+
layout: 'centered',
|
|
22
|
+
},
|
|
23
|
+
argTypes: {
|
|
24
|
+
heading: {
|
|
25
|
+
control: 'text',
|
|
26
|
+
description: 'The heading text',
|
|
27
|
+
},
|
|
28
|
+
description: {
|
|
29
|
+
control: 'text',
|
|
30
|
+
description: 'The description text',
|
|
31
|
+
},
|
|
32
|
+
direction: {
|
|
33
|
+
control: 'select',
|
|
34
|
+
description: 'Layout direction for icon/image and content',
|
|
35
|
+
options: ['horizontal', 'vertical'],
|
|
36
|
+
},
|
|
37
|
+
variant: {
|
|
38
|
+
control: 'select',
|
|
39
|
+
description: 'The variant style of the banner',
|
|
40
|
+
options: ['emphasis', 'subtle'],
|
|
41
|
+
},
|
|
42
|
+
colorScheme: {
|
|
43
|
+
control: 'select',
|
|
44
|
+
description: 'The color scheme for the banner',
|
|
45
|
+
options: ['pig', 'energy', 'broadband', 'mobile', 'insurance', 'cashback', 'highlight'],
|
|
46
|
+
},
|
|
47
|
+
iconContainerVariant: {
|
|
48
|
+
control: 'select',
|
|
49
|
+
description: 'Icon container variant',
|
|
50
|
+
options: ['subtle', 'emphasis'],
|
|
51
|
+
},
|
|
52
|
+
iconContainerSize: {
|
|
53
|
+
control: 'select',
|
|
54
|
+
description: 'Icon container size',
|
|
55
|
+
options: ['sm', 'md', 'lg'],
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
args: {
|
|
59
|
+
heading: 'Welcome to Banner',
|
|
60
|
+
description: 'This is a banner component that can display an icon or image with content.',
|
|
61
|
+
direction: 'horizontal',
|
|
62
|
+
variant: 'subtle',
|
|
63
|
+
colorScheme: 'pig',
|
|
64
|
+
},
|
|
65
|
+
} satisfies Meta<typeof Banner>;
|
|
66
|
+
|
|
67
|
+
export default meta;
|
|
68
|
+
type Story = StoryObj<typeof meta>;
|
|
69
|
+
|
|
70
|
+
export const Playground: Story = {
|
|
71
|
+
render: (args: any) => {
|
|
72
|
+
return (
|
|
73
|
+
<View style={{ width: 400 }}>
|
|
74
|
+
<Banner {...args} icon={ElectricityMediumIcon} />
|
|
75
|
+
</View>
|
|
76
|
+
);
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export const WithIcon: Story = {
|
|
81
|
+
render: () => {
|
|
82
|
+
return (
|
|
83
|
+
<View style={{ width: 400 }}>
|
|
84
|
+
<Flex space="lg" direction="column">
|
|
85
|
+
<Banner
|
|
86
|
+
icon={ElectricityMediumIcon}
|
|
87
|
+
iconContainerColor="energy"
|
|
88
|
+
heading="Energy Services"
|
|
89
|
+
description="Manage your energy account and view your usage."
|
|
90
|
+
/>
|
|
91
|
+
<Banner
|
|
92
|
+
icon={BroadbandMediumIcon}
|
|
93
|
+
iconContainerColor="broadband"
|
|
94
|
+
iconContainerVariant="emphasis"
|
|
95
|
+
heading="Broadband Plans"
|
|
96
|
+
description="Upgrade your broadband to faster speeds."
|
|
97
|
+
/>
|
|
98
|
+
<Banner
|
|
99
|
+
icon={MobileMediumIcon}
|
|
100
|
+
iconContainerColor="mobile"
|
|
101
|
+
iconContainerSize="lg"
|
|
102
|
+
heading="Mobile Deals"
|
|
103
|
+
description="Check out our latest mobile offers."
|
|
104
|
+
/>
|
|
105
|
+
</Flex>
|
|
106
|
+
</View>
|
|
107
|
+
);
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
export const WithIllustration: Story = {
|
|
112
|
+
render: () => {
|
|
113
|
+
return (
|
|
114
|
+
<View style={{ width: 400 }}>
|
|
115
|
+
<Flex space="lg" direction="column">
|
|
116
|
+
<Banner
|
|
117
|
+
illustration={{
|
|
118
|
+
// @ts-ignore
|
|
119
|
+
light: <SpotBillingLight width={80} height={80} />,
|
|
120
|
+
// @ts-ignore
|
|
121
|
+
dark: <SpotBillingDark width={80} height={80} />,
|
|
122
|
+
}}
|
|
123
|
+
heading="Featured Content"
|
|
124
|
+
description="Discover amazing content curated just for you."
|
|
125
|
+
/>
|
|
126
|
+
<Banner
|
|
127
|
+
direction="vertical"
|
|
128
|
+
illustration={{
|
|
129
|
+
// @ts-ignore
|
|
130
|
+
light: <SpotBillingLight width={120} height={120} />,
|
|
131
|
+
// @ts-ignore
|
|
132
|
+
dark: <SpotBillingDark width={120} height={120} />,
|
|
133
|
+
}}
|
|
134
|
+
heading="Special Offer"
|
|
135
|
+
description="Limited time offer on selected services."
|
|
136
|
+
/>
|
|
137
|
+
</Flex>
|
|
138
|
+
</View>
|
|
139
|
+
);
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
export const WithImage: Story = {
|
|
144
|
+
render: () => {
|
|
145
|
+
return (
|
|
146
|
+
<View style={{ width: 400 }}>
|
|
147
|
+
<Flex space="lg" direction="column">
|
|
148
|
+
<Banner
|
|
149
|
+
image={{
|
|
150
|
+
light: {
|
|
151
|
+
uri: 'https://images.unsplash.com/photo-1506126613408-eca07ce68773?w=200&q=80',
|
|
152
|
+
},
|
|
153
|
+
dark: {
|
|
154
|
+
uri: 'https://images.unsplash.com/photo-1506126613408-eca07ce68773?w=200&q=80',
|
|
155
|
+
},
|
|
156
|
+
}}
|
|
157
|
+
heading="Featured Content"
|
|
158
|
+
description="Discover amazing content curated just for you."
|
|
159
|
+
/>
|
|
160
|
+
<Banner
|
|
161
|
+
direction="vertical"
|
|
162
|
+
image={{
|
|
163
|
+
light: {
|
|
164
|
+
uri: 'https://images.unsplash.com/photo-1473186578172-c141e6798cf4?w=200&q=80',
|
|
165
|
+
},
|
|
166
|
+
dark: {
|
|
167
|
+
uri: 'https://images.unsplash.com/photo-1473186578172-c141e6798cf4?w=200&q=80',
|
|
168
|
+
},
|
|
169
|
+
}}
|
|
170
|
+
heading="Special Offer"
|
|
171
|
+
description="Limited time offer on selected services."
|
|
172
|
+
/>
|
|
173
|
+
</Flex>
|
|
174
|
+
</View>
|
|
175
|
+
);
|
|
176
|
+
},
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
export const WithButton: Story = {
|
|
180
|
+
render: () => {
|
|
181
|
+
return (
|
|
182
|
+
<View style={{ width: 400 }}>
|
|
183
|
+
<Flex space="lg" direction="column">
|
|
184
|
+
<Banner
|
|
185
|
+
icon={InsuranceMediumIcon}
|
|
186
|
+
iconContainerColor="insurance"
|
|
187
|
+
heading="Home Insurance"
|
|
188
|
+
description="Protect your home with our comprehensive insurance."
|
|
189
|
+
button={
|
|
190
|
+
<Button size="sm" onPress={() => console.log('Get Quote pressed')}>
|
|
191
|
+
Get Quote
|
|
192
|
+
</Button>
|
|
193
|
+
}
|
|
194
|
+
/>
|
|
195
|
+
<Banner
|
|
196
|
+
icon={CashbackCardMediumIcon}
|
|
197
|
+
iconContainerColor="cashback"
|
|
198
|
+
heading="Cashback Rewards"
|
|
199
|
+
description="Earn cashback on every purchase."
|
|
200
|
+
colorScheme="cashback"
|
|
201
|
+
button={
|
|
202
|
+
<Button size="sm" onPress={() => console.log('Learn More pressed')}>
|
|
203
|
+
Learn More
|
|
204
|
+
</Button>
|
|
205
|
+
}
|
|
206
|
+
/>
|
|
207
|
+
</Flex>
|
|
208
|
+
</View>
|
|
209
|
+
);
|
|
210
|
+
},
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
export const WithLink: Story = {
|
|
214
|
+
render: () => {
|
|
215
|
+
return (
|
|
216
|
+
<View style={{ width: 400 }}>
|
|
217
|
+
<Flex space="lg" direction="column">
|
|
218
|
+
<Banner
|
|
219
|
+
icon={ElectricityMediumIcon}
|
|
220
|
+
iconContainerColor="energy"
|
|
221
|
+
heading="Energy Saving Tips"
|
|
222
|
+
description="Learn how to reduce your energy consumption."
|
|
223
|
+
link={<Link href="#">View tips</Link>}
|
|
224
|
+
/>
|
|
225
|
+
<Banner
|
|
226
|
+
icon={BroadbandMediumIcon}
|
|
227
|
+
iconContainerColor="broadband"
|
|
228
|
+
heading="Network Status"
|
|
229
|
+
description="Check the status of your broadband connection."
|
|
230
|
+
link={<Link href="#">Check status</Link>}
|
|
231
|
+
/>
|
|
232
|
+
</Flex>
|
|
233
|
+
</View>
|
|
234
|
+
);
|
|
235
|
+
},
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
export const Pressable: Story = {
|
|
239
|
+
render: () => {
|
|
240
|
+
return (
|
|
241
|
+
<View style={{ width: 400 }}>
|
|
242
|
+
<Flex space="lg" direction="column">
|
|
243
|
+
<Banner
|
|
244
|
+
icon={ElectricityMediumIcon}
|
|
245
|
+
iconContainerColor="energy"
|
|
246
|
+
heading="Energy Dashboard"
|
|
247
|
+
description="View your energy usage and bills."
|
|
248
|
+
onPress={() => console.log('Banner pressed')}
|
|
249
|
+
/>
|
|
250
|
+
<Banner
|
|
251
|
+
image={{
|
|
252
|
+
light: {
|
|
253
|
+
uri: 'https://images.unsplash.com/photo-1506126613408-eca07ce68773?w=200&q=80',
|
|
254
|
+
},
|
|
255
|
+
dark: {
|
|
256
|
+
uri: 'https://images.unsplash.com/photo-1506126613408-eca07ce68773?w=200&q=80',
|
|
257
|
+
},
|
|
258
|
+
}}
|
|
259
|
+
heading="Account Settings"
|
|
260
|
+
description="Manage your account preferences."
|
|
261
|
+
onPress={() => console.log('Banner pressed')}
|
|
262
|
+
/>
|
|
263
|
+
</Flex>
|
|
264
|
+
</View>
|
|
265
|
+
);
|
|
266
|
+
},
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
export const WithClose: Story = {
|
|
270
|
+
render: () => {
|
|
271
|
+
return (
|
|
272
|
+
<View style={{ width: 400 }}>
|
|
273
|
+
<Flex space="lg" direction="column">
|
|
274
|
+
<Banner
|
|
275
|
+
icon={ElectricityMediumIcon}
|
|
276
|
+
iconContainerColor="energy"
|
|
277
|
+
heading="Special Announcement"
|
|
278
|
+
description="We have some exciting news to share with you."
|
|
279
|
+
onClose={() => console.log('Close pressed')}
|
|
280
|
+
/>
|
|
281
|
+
<Banner
|
|
282
|
+
icon={MobileMediumIcon}
|
|
283
|
+
iconContainerColor="mobile"
|
|
284
|
+
direction="vertical"
|
|
285
|
+
heading="New Feature"
|
|
286
|
+
description="Check out our latest feature update."
|
|
287
|
+
button={
|
|
288
|
+
<Button size="sm" onPress={() => console.log('Explore pressed')}>
|
|
289
|
+
Explore
|
|
290
|
+
</Button>
|
|
291
|
+
}
|
|
292
|
+
onClose={() => console.log('Close pressed')}
|
|
293
|
+
/>
|
|
294
|
+
</Flex>
|
|
295
|
+
</View>
|
|
296
|
+
);
|
|
297
|
+
},
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
export const VerticalLayout: Story = {
|
|
301
|
+
render: () => {
|
|
302
|
+
return (
|
|
303
|
+
<View style={{ width: 400 }}>
|
|
304
|
+
<Flex space="lg" direction="column">
|
|
305
|
+
<Banner
|
|
306
|
+
icon={ElectricityMediumIcon}
|
|
307
|
+
iconContainerColor="energy"
|
|
308
|
+
heading="Energy Services"
|
|
309
|
+
description="Manage your energy account and view your usage."
|
|
310
|
+
direction="vertical"
|
|
311
|
+
/>
|
|
312
|
+
<Banner
|
|
313
|
+
image={{
|
|
314
|
+
light: {
|
|
315
|
+
uri: 'https://images.unsplash.com/photo-1506126613408-eca07ce68773?w=200&q=80',
|
|
316
|
+
},
|
|
317
|
+
dark: {
|
|
318
|
+
uri: 'https://images.unsplash.com/photo-1506126613408-eca07ce68773?w=200&q=80',
|
|
319
|
+
},
|
|
320
|
+
}}
|
|
321
|
+
heading="Featured Content"
|
|
322
|
+
description="Discover amazing content curated just for you."
|
|
323
|
+
direction="vertical"
|
|
324
|
+
button={
|
|
325
|
+
<Button size="sm" onPress={() => console.log('Learn More pressed')}>
|
|
326
|
+
Learn More
|
|
327
|
+
</Button>
|
|
328
|
+
}
|
|
329
|
+
/>
|
|
330
|
+
</Flex>
|
|
331
|
+
</View>
|
|
332
|
+
);
|
|
333
|
+
},
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
export const ColorSchemes: Story = {
|
|
337
|
+
render: () => {
|
|
338
|
+
return (
|
|
339
|
+
<View style={{ width: 400 }}>
|
|
340
|
+
<Flex space="lg" direction="column">
|
|
341
|
+
<Banner
|
|
342
|
+
icon={ElectricityMediumIcon}
|
|
343
|
+
iconContainerColor="pig"
|
|
344
|
+
colorScheme="pig"
|
|
345
|
+
heading="Pig Pink"
|
|
346
|
+
description="Banner with pig color scheme."
|
|
347
|
+
button={
|
|
348
|
+
<Button size="sm" onPress={() => console.log('Action pressed')}>
|
|
349
|
+
Action
|
|
350
|
+
</Button>
|
|
351
|
+
}
|
|
352
|
+
/>
|
|
353
|
+
<Banner
|
|
354
|
+
icon={ElectricityMediumIcon}
|
|
355
|
+
iconContainerColor="energy"
|
|
356
|
+
colorScheme="energy"
|
|
357
|
+
heading="Energy Blue"
|
|
358
|
+
description="Banner with energy color scheme."
|
|
359
|
+
button={
|
|
360
|
+
<Button size="sm" onPress={() => console.log('Action pressed')}>
|
|
361
|
+
Action
|
|
362
|
+
</Button>
|
|
363
|
+
}
|
|
364
|
+
/>
|
|
365
|
+
<Banner
|
|
366
|
+
icon={BroadbandMediumIcon}
|
|
367
|
+
iconContainerColor="broadband"
|
|
368
|
+
colorScheme="broadband"
|
|
369
|
+
heading="Broadband Green"
|
|
370
|
+
description="Banner with broadband color scheme."
|
|
371
|
+
button={
|
|
372
|
+
<Button size="sm" onPress={() => console.log('Action pressed')}>
|
|
373
|
+
Action
|
|
374
|
+
</Button>
|
|
375
|
+
}
|
|
376
|
+
/>
|
|
377
|
+
<Banner
|
|
378
|
+
icon={MobileMediumIcon}
|
|
379
|
+
iconContainerColor="mobile"
|
|
380
|
+
colorScheme="mobile"
|
|
381
|
+
heading="Mobile Rose"
|
|
382
|
+
description="Banner with mobile color scheme."
|
|
383
|
+
button={
|
|
384
|
+
<Button size="sm" onPress={() => console.log('Action pressed')}>
|
|
385
|
+
Action
|
|
386
|
+
</Button>
|
|
387
|
+
}
|
|
388
|
+
/>
|
|
389
|
+
<Banner
|
|
390
|
+
icon={InsuranceMediumIcon}
|
|
391
|
+
iconContainerColor="insurance"
|
|
392
|
+
colorScheme="insurance"
|
|
393
|
+
heading="Insurance Orange"
|
|
394
|
+
description="Banner with insurance color scheme."
|
|
395
|
+
button={
|
|
396
|
+
<Button size="sm" onPress={() => console.log('Action pressed')}>
|
|
397
|
+
Action
|
|
398
|
+
</Button>
|
|
399
|
+
}
|
|
400
|
+
/>
|
|
401
|
+
<Banner
|
|
402
|
+
icon={CashbackCardMediumIcon}
|
|
403
|
+
iconContainerColor="cashback"
|
|
404
|
+
colorScheme="cashback"
|
|
405
|
+
heading="Cashback Lilac"
|
|
406
|
+
description="Banner with cashback color scheme."
|
|
407
|
+
button={
|
|
408
|
+
<Button size="sm" onPress={() => console.log('Action pressed')}>
|
|
409
|
+
Action
|
|
410
|
+
</Button>
|
|
411
|
+
}
|
|
412
|
+
/>
|
|
413
|
+
</Flex>
|
|
414
|
+
</View>
|
|
415
|
+
);
|
|
416
|
+
},
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
export const EmphasisVariant: Story = {
|
|
420
|
+
render: () => {
|
|
421
|
+
return (
|
|
422
|
+
<View style={{ width: 400 }}>
|
|
423
|
+
<Flex space="lg" direction="column">
|
|
424
|
+
<Banner
|
|
425
|
+
icon={ElectricityMediumIcon}
|
|
426
|
+
iconContainerColor="energy"
|
|
427
|
+
iconContainerVariant="emphasis"
|
|
428
|
+
heading="Important Notice"
|
|
429
|
+
description="This banner uses the emphasis variant for increased visibility."
|
|
430
|
+
variant="emphasis"
|
|
431
|
+
/>
|
|
432
|
+
<Banner
|
|
433
|
+
image={{
|
|
434
|
+
light: {
|
|
435
|
+
uri: 'https://images.unsplash.com/photo-1473186578172-c141e6798cf4?w=200&q=80',
|
|
436
|
+
},
|
|
437
|
+
dark: {
|
|
438
|
+
uri: 'https://images.unsplash.com/photo-1473186578172-c141e6798cf4?w=200&q=80',
|
|
439
|
+
},
|
|
440
|
+
}}
|
|
441
|
+
heading="Featured Offer"
|
|
442
|
+
description="Limited time deal on premium services."
|
|
443
|
+
variant="emphasis"
|
|
444
|
+
button={
|
|
445
|
+
<Button size="sm" onPress={() => console.log('Claim pressed')}>
|
|
446
|
+
Claim Now
|
|
447
|
+
</Button>
|
|
448
|
+
}
|
|
449
|
+
/>
|
|
450
|
+
</Flex>
|
|
451
|
+
</View>
|
|
452
|
+
);
|
|
453
|
+
},
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
export const ComplexExample: Story = {
|
|
457
|
+
render: () => {
|
|
458
|
+
return (
|
|
459
|
+
<View style={{ width: 400 }}>
|
|
460
|
+
<Flex space="lg" direction="column">
|
|
461
|
+
<Banner
|
|
462
|
+
icon={InsuranceMediumIcon}
|
|
463
|
+
iconContainerColor="insurance"
|
|
464
|
+
iconContainerVariant="emphasis"
|
|
465
|
+
colorScheme="insurance"
|
|
466
|
+
heading="Home Insurance Alert"
|
|
467
|
+
description="Your policy renewal is coming up. Review your coverage and make any necessary changes."
|
|
468
|
+
button={
|
|
469
|
+
<Button size="sm" onPress={() => console.log('Review pressed')}>
|
|
470
|
+
Review Policy
|
|
471
|
+
</Button>
|
|
472
|
+
}
|
|
473
|
+
onPress={() => console.log('Banner pressed')}
|
|
474
|
+
/>
|
|
475
|
+
<Banner
|
|
476
|
+
image={{
|
|
477
|
+
light: {
|
|
478
|
+
uri: 'https://images.unsplash.com/photo-1501594907352-04cda38ebc29?w=200&q=80',
|
|
479
|
+
},
|
|
480
|
+
dark: {
|
|
481
|
+
uri: 'https://images.unsplash.com/photo-1501594907352-04cda38ebc29?w=200&q=80',
|
|
482
|
+
},
|
|
483
|
+
}}
|
|
484
|
+
heading="Exclusive Member Benefit"
|
|
485
|
+
description="As a valued member, you now have access to premium features at no extra cost."
|
|
486
|
+
variant="emphasis"
|
|
487
|
+
link={<Link href="#">Explore benefits</Link>}
|
|
488
|
+
onClose={() => console.log('Close pressed')}
|
|
489
|
+
/>
|
|
490
|
+
</Flex>
|
|
491
|
+
</View>
|
|
492
|
+
);
|
|
493
|
+
},
|
|
494
|
+
};
|