@utilitywarehouse/hearth-react-native 0.16.0 → 0.16.2

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.
Files changed (96) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/.turbo/turbo-lint.log +67 -4
  3. package/CHANGELOG.md +30 -0
  4. package/build/components/Avatar/Avatar.js +0 -2
  5. package/build/components/Banner/Banner.d.ts +1 -1
  6. package/build/components/Banner/Banner.js +3 -1
  7. package/build/components/Carousel/Carousel.js +1 -1
  8. package/build/components/DateInput/DateInput.d.ts +1 -1
  9. package/build/components/DateInput/DateInput.js +2 -2
  10. package/build/components/DateInput/DateInput.props.d.ts +22 -1
  11. package/build/components/DateInput/DateInputSegment.d.ts +2 -16
  12. package/build/components/DateInput/DateInputSegment.js +2 -5
  13. package/build/components/DatePicker/DatePicker.js +8 -4
  14. package/build/components/DatePicker/DatePickerHeader/DatePickerHeader.props.d.ts +0 -1
  15. package/build/components/DatePicker/DatePickerHeader/index.js +1 -1
  16. package/build/components/DatePicker/index.d.ts +1 -0
  17. package/build/components/DatePicker/polyfill.js +3 -3
  18. package/build/components/DatePicker/time-picker/wheel-web.js +1 -3
  19. package/build/components/DatePickerInput/DatePickerInput.js +1 -2
  20. package/build/components/DescriptionList/DescriptionList.d.ts +1 -1
  21. package/build/components/DescriptionList/DescriptionList.js +2 -2
  22. package/build/components/DescriptionList/DescriptionList.props.d.ts +1 -0
  23. package/build/components/DescriptionList/DescriptionListItem.d.ts +1 -1
  24. package/build/components/DescriptionList/DescriptionListItem.js +3 -2
  25. package/build/components/DescriptionList/DescriptionListItem.props.d.ts +1 -0
  26. package/build/components/Input/Input.js +1 -1
  27. package/build/components/Switch/Switch.js +1 -1
  28. package/build/components/Tabs/Tabs.d.ts +1 -1
  29. package/build/components/Tabs/Tabs.js +1 -1
  30. package/build/components/Textarea/Textarea.js +3 -0
  31. package/build/components/Toast/ToastItem.js +1 -1
  32. package/build/components/ToggleButton/ToggleButtonIcon.js +1 -1
  33. package/build/components/ToggleButton/ToggleButtonRoot.js +0 -2
  34. package/build/components/UnstyledIconButton/UnstyledIconButtonIcon.js +1 -1
  35. package/build/utils/coloursAsArray.js +1 -1
  36. package/docs/components/AllComponents.web.tsx +16 -18
  37. package/docs/components/UsageWrap.tsx +17 -20
  38. package/eslint.config.js +5 -1
  39. package/package.json +11 -11
  40. package/src/components/Accordion/Accordion.figma.tsx +15 -17
  41. package/src/components/Accordion/AccordionItem.figma.tsx +27 -0
  42. package/src/components/Avatar/Avatar.figma.tsx +11 -21
  43. package/src/components/Avatar/Avatar.tsx +0 -2
  44. package/src/components/Badge/Badge.figma.tsx +45 -54
  45. package/src/components/Banner/Banner.figma.tsx +21 -13
  46. package/src/components/Banner/Banner.stories.tsx +4 -4
  47. package/src/components/Banner/Banner.tsx +2 -1
  48. package/src/components/Button/Button.figma.tsx +118 -46
  49. package/src/components/Card/Card.figma.tsx +27 -43
  50. package/src/components/Card/Card.stories.tsx +1 -1
  51. package/src/components/Carousel/Carousel.figma.tsx +20 -17
  52. package/src/components/Carousel/Carousel.tsx +1 -1
  53. package/src/components/Checkbox/Checkbox.figma.tsx +15 -18
  54. package/src/components/Checkbox/Checkbox.stories.tsx +2 -2
  55. package/src/components/Checkbox/CheckboxGroup.figma.tsx +48 -15
  56. package/src/components/Checkbox/CheckboxTileRoot.figma.tsx +24 -27
  57. package/src/components/CurrencyInput/CurrencyInput.figma.tsx +65 -49
  58. package/src/components/DateInput/DateInput.docs.mdx +47 -29
  59. package/src/components/DateInput/DateInput.figma.tsx +58 -45
  60. package/src/components/DateInput/DateInput.props.ts +32 -1
  61. package/src/components/DateInput/DateInput.stories.tsx +10 -0
  62. package/src/components/DateInput/DateInput.tsx +12 -0
  63. package/src/components/DateInput/DateInputSegment.tsx +7 -22
  64. package/src/components/DatePicker/DatePicker.figma.tsx +47 -0
  65. package/src/components/DatePicker/DatePicker.tsx +8 -4
  66. package/src/components/DatePicker/DatePickerHeader/DatePickerHeader.props.ts +0 -2
  67. package/src/components/DatePicker/DatePickerHeader/index.tsx +2 -2
  68. package/src/components/DatePicker/index.ts +2 -0
  69. package/src/components/DatePicker/polyfill.ts +3 -3
  70. package/src/components/DatePicker/time-picker/wheel-web.tsx +0 -1
  71. package/src/components/DatePickerInput/DatePickerInput.figma.tsx +18 -46
  72. package/src/components/DatePickerInput/DatePickerInput.tsx +0 -2
  73. package/src/components/DescriptionList/DescriptionList.docs.mdx +16 -14
  74. package/src/components/DescriptionList/DescriptionList.figma.tsx +41 -17
  75. package/src/components/DescriptionList/DescriptionList.props.ts +1 -0
  76. package/src/components/DescriptionList/DescriptionList.stories.tsx +24 -0
  77. package/src/components/DescriptionList/DescriptionList.tsx +2 -0
  78. package/src/components/DescriptionList/DescriptionListItem.figma.tsx +42 -0
  79. package/src/components/DescriptionList/DescriptionListItem.props.ts +1 -0
  80. package/src/components/DescriptionList/DescriptionListItem.tsx +7 -0
  81. package/src/components/Divider/Divider.figma.tsx +10 -23
  82. package/src/components/Input/Input.tsx +0 -1
  83. package/src/components/List/List.stories.tsx +1 -4
  84. package/src/components/Radio/Radio.stories.tsx +1 -1
  85. package/src/components/Switch/Switch.tsx +1 -1
  86. package/src/components/Tabs/Tabs.tsx +0 -1
  87. package/src/components/Textarea/Textarea.tsx +3 -0
  88. package/src/components/ThemedImage/ThemedImage.stories.tsx +14 -14
  89. package/src/components/Toast/ToastItem.tsx +1 -1
  90. package/src/components/ToggleButton/ToggleButtonIcon.tsx +1 -1
  91. package/src/components/ToggleButton/ToggleButtonRoot.tsx +0 -2
  92. package/src/components/UnstyledIconButton/UnstyledIconButtonIcon.tsx +1 -1
  93. package/src/utils/coloursAsArray.ts +1 -1
  94. package/tsconfig.eslint.json +13 -0
  95. package/src/components/Accordion/AccordionItemRoot.figma.tsx +0 -47
  96. package/src/components/DatePicker/DatePickerCalendar.figma.tsx +0 -34
@@ -13,9 +13,9 @@ import {
13
13
  ShareSmallIcon,
14
14
  TrashSmallIcon,
15
15
  } from '@utilitywarehouse/hearth-react-native-icons';
16
- // @ts-ignore
16
+ // @ts-expect-error - Module missing type declarations
17
17
  import SpotBillingDark from '@utilitywarehouse/hearth-svg-assets/lib/spot-billing-dark.svg';
18
- // @ts-ignore
18
+ // @ts-expect-error - Module missing type declarations
19
19
  import SpotBillingLight from '@utilitywarehouse/hearth-svg-assets/lib/spot-billing-light.svg';
20
20
  import { Pressable, ScrollView, View, ViewProps } from 'react-native';
21
21
  import { StyleSheet } from 'react-native-unistyles';
@@ -176,6 +176,7 @@ const AllComponents: React.FC = () => {
176
176
  const handleMenuOpenPress = useCallback(() => {
177
177
  menuRef.current?.present();
178
178
  }, []);
179
+ const [pillValue, setPillValue] = React.useState<string[]>(['energy', 'mobile']);
179
180
 
180
181
  const [colorMode] = useColorMode();
181
182
  const isDark = colorMode === 'dark';
@@ -648,22 +649,19 @@ const AllComponents: React.FC = () => {
648
649
  </ComponentWrapper>
649
650
  <ComponentWrapper name="Pill Group" link="/?path=/docs/components-pill-group--docs">
650
651
  <Center flex={1} p="200">
651
- {(() => {
652
- const [pillValue, setPillValue] = React.useState<string[]>(['energy', 'mobile']);
653
- return (
654
- <PillGroup
655
- value={pillValue}
656
- onChange={v => setPillValue(v as string[])}
657
- wrap={false}
658
- multiple
659
- >
660
- <Pill value="all" label="All" />
661
- <Pill value="energy" label="Energy" icon={ElectricityMediumIcon} />
662
- <Pill value="broadband" label="Broadband" icon={BroadbandMediumIcon} />
663
- <Pill value="mobile" label="Mobile" icon={MobileMediumIcon} />
664
- </PillGroup>
665
- );
666
- })()}
652
+ (
653
+ <PillGroup
654
+ value={pillValue}
655
+ onChange={v => setPillValue(v as string[])}
656
+ wrap={false}
657
+ multiple
658
+ >
659
+ <Pill value="all" label="All" />
660
+ <Pill value="energy" label="Energy" icon={ElectricityMediumIcon} />
661
+ <Pill value="broadband" label="Broadband" icon={BroadbandMediumIcon} />
662
+ <Pill value="mobile" label="Mobile" icon={MobileMediumIcon} />
663
+ </PillGroup>
664
+ );
667
665
  </Center>
668
666
  </ComponentWrapper>
669
667
  <ComponentWrapper
@@ -1,24 +1,21 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
- import { BottomSheetModalProvider, Box, useColorMode } from '../../src';
2
+ import { BottomSheetModalProvider, Box } from '../../src';
3
3
 
4
- const UsageWrap: FC<PropsWithChildren> = ({ children }) => {
5
- const [colorMode] = useColorMode();
6
- return (
7
- <div className="sb-unstyled">
8
- <Box
9
- mt="300"
10
- p="200"
11
- bg="backgroundPrimary"
12
- borderRadius="md"
13
- borderWidth="1"
14
- borderColor="borderSubtle"
15
- width="100%"
16
- position="relative"
17
- >
18
- <BottomSheetModalProvider>{children}</BottomSheetModalProvider>
19
- </Box>
20
- </div>
21
- );
22
- };
4
+ const UsageWrap: FC<PropsWithChildren> = ({ children }) => (
5
+ <div className="sb-unstyled">
6
+ <Box
7
+ mt="300"
8
+ p="200"
9
+ bg="backgroundPrimary"
10
+ borderRadius="md"
11
+ borderWidth="1"
12
+ borderColor="borderSubtle"
13
+ width="100%"
14
+ position="relative"
15
+ >
16
+ <BottomSheetModalProvider>{children}</BottomSheetModalProvider>
17
+ </Box>
18
+ </div>
19
+ );
23
20
 
24
21
  export default UsageWrap;
package/eslint.config.js CHANGED
@@ -8,13 +8,17 @@ import globals from 'globals';
8
8
  import tseslint from 'typescript-eslint';
9
9
 
10
10
  export default tseslint.config(
11
- { ignores: ['build', 'dist', 'storybook-static'] },
11
+ { ignores: ['build', 'dist', 'storybook-static', '**/*.figma.tsx'] },
12
12
  {
13
13
  extends: [js.configs.recommended, ...tseslint.configs.recommended],
14
14
  files: ['**/*.{ts,tsx}'],
15
15
  languageOptions: {
16
16
  ecmaVersion: 2020,
17
17
  globals: globals.browser,
18
+ parserOptions: {
19
+ project: './tsconfig.eslint.json',
20
+ tsconfigRootDir: import.meta.dirname,
21
+ },
18
22
  },
19
23
  plugins: {
20
24
  'react-hooks': reactHooks,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utilitywarehouse/hearth-react-native",
3
- "version": "0.16.0",
3
+ "version": "0.16.2",
4
4
  "description": "Utility Warehouse React Native UI library",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -25,18 +25,18 @@
25
25
  "devDependencies": {
26
26
  "@babel/plugin-proposal-export-namespace-from": "^7.18.9",
27
27
  "@chromatic-com/storybook": "^4.1.3",
28
- "@figma/code-connect": "^1.3.11",
28
+ "@figma/code-connect": "^1.3.12",
29
29
  "@gorhom/bottom-sheet": "5.2.6",
30
- "@storybook/addon-a11y": "^10.1.4",
31
- "@storybook/addon-docs": "^10.1.4",
32
- "@storybook/addon-vitest": "^10.1.4",
33
- "@storybook/react-native-web-vite": "^10.1.4",
30
+ "@storybook/addon-a11y": "^10.2.1",
31
+ "@storybook/addon-docs": "^10.2.1",
32
+ "@storybook/addon-vitest": "^10.2.1",
33
+ "@storybook/react-native-web-vite": "^10.2.1",
34
34
  "@types/prismjs": "^1.26.5",
35
35
  "@types/react": "^19.1.10",
36
36
  "@vitest/browser": "^3.2.4",
37
37
  "@vitest/coverage-v8": "^3.2.4",
38
38
  "chromatic": "^13.3.0",
39
- "eslint-plugin-storybook": "10.1.4",
39
+ "eslint-plugin-storybook": "10.2.1",
40
40
  "playwright": "^1.55.1",
41
41
  "prismjs": "^1.30.0",
42
42
  "react": "^19.1.0",
@@ -50,15 +50,15 @@
50
50
  "react-native-web": "^0.20.0",
51
51
  "react-native-worklets": "^0.6.1",
52
52
  "remark-gfm": "^4.0.1",
53
- "storybook": "^10.1.4",
53
+ "storybook": "^10.2.1",
54
54
  "typescript": "^5.7.3",
55
55
  "vite": "^7.1.3",
56
56
  "vite-plugin-svgr": "^4.5.0",
57
57
  "vitest": "^3.2.4",
58
- "@utilitywarehouse/hearth-fonts": "^0.0.4",
59
58
  "@utilitywarehouse/hearth-react-icons": "^0.7.4",
60
59
  "@utilitywarehouse/hearth-react-native-icons": "^0.7.4",
61
60
  "@utilitywarehouse/hearth-svg-assets": "^0.3.0",
61
+ "@utilitywarehouse/hearth-fonts": "^0.0.4",
62
62
  "@utilitywarehouse/hearth-tokens": "^0.2.2"
63
63
  },
64
64
  "peerDependencies": {
@@ -76,8 +76,8 @@
76
76
  "clean": "rm -rf node_modules rm -rf build .turbo",
77
77
  "generateColours": "node ./scripts/generateColours.js",
78
78
  "copyTokens": "node ./scripts/copyTokens.js",
79
- "lint:fix": "TIMING=1 eslint --fix --max-warnings 0",
80
- "lint": "TIMING=1 eslint --max-warnings 0",
79
+ "lint:fix": "TIMING=1 eslint --fix .",
80
+ "lint": "TIMING=1 eslint .",
81
81
  "build": "tsc",
82
82
  "watch": "tsc --watch",
83
83
  "figma:create": "figma connect create",
@@ -1,23 +1,21 @@
1
- import React from "react"
2
- import Accordion from "./Accordion"
3
- import figma from "@figma/code-connect"
4
-
5
- /**
6
- * -- This file was auto-generated by Code Connect --
7
- * None of your props could be automatically mapped to Figma properties.
8
- * You should update the `props` object to include a mapping from your
9
- * code props to Figma properties, and update the `example` function to
10
- * return the code example you'd like to see in Figma
11
- */
1
+ import figma from '@figma/code-connect';
2
+ import { Accordion } from './';
12
3
 
13
4
  figma.connect(
14
5
  Accordion,
15
- "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=3385%3A7751",
6
+ 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=3385%3A7751',
16
7
  {
17
8
  props: {
18
- // No matching props could be found for these Figma properties:
19
- // "sectionHeader": figma.boolean('Section header?')
9
+ sectionHeader: figma.nestedProps('Section Header', {
10
+ helperText: figma.string('Helper text'),
11
+ heading: figma.string('Heading'),
12
+ }),
13
+ items: figma.children('Accordion Item'),
20
14
  },
21
- example: (props) => <Accordion />,
22
- },
23
- )
15
+ example: props => (
16
+ <Accordion heading={props.sectionHeader.heading} helperText={props.sectionHeader.helperText}>
17
+ {props.items}
18
+ </Accordion>
19
+ ),
20
+ }
21
+ );
@@ -0,0 +1,27 @@
1
+ import figma from '@figma/code-connect';
2
+ import { BodyText } from '../BodyText';
3
+ import { AccordionItem } from './';
4
+
5
+ figma.connect(
6
+ AccordionItem,
7
+ 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=3390%3A6160',
8
+ {
9
+ props: {
10
+ title: figma.string('Title'),
11
+ expanded: figma.boolean('Expand?'),
12
+ triggerContent: figma.instance('Trigger custom content'),
13
+ description: figma.string('Description'),
14
+ content: figma.instance('Custom content'),
15
+ },
16
+ example: props => (
17
+ <AccordionItem
18
+ title={props.title}
19
+ expanded={props.expanded}
20
+ triggerContent={props.triggerContent}
21
+ >
22
+ <BodyText>{props.description}</BodyText>
23
+ {props.content}
24
+ </AccordionItem>
25
+ ),
26
+ }
27
+ );
@@ -1,33 +1,23 @@
1
- import React from "react"
2
- import Avatar from "./Avatar"
3
- import figma from "@figma/code-connect"
4
-
5
- /**
6
- * -- This file was auto-generated by Code Connect --
7
- * `props` includes a mapping from your code props to Figma properties.
8
- * You should check this is correct, and update the `example` function
9
- * to return the code example you'd like to see in Figma
10
- */
1
+ import figma from '@figma/code-connect';
2
+ import { Avatar } from '../';
11
3
 
12
4
  figma.connect(
13
5
  Avatar,
14
- "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=6790%3A14313",
6
+ 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components---Tokens?node-id=6790-14313',
15
7
  {
16
8
  props: {
17
- // These props were automatically mapped based on your linked code:
18
- size: figma.enum("Size", {
19
- "SM-32": "sm",
20
- "MD-48": "md",
9
+ size: figma.enum('Size', {
10
+ 'SM-32': 'sm',
11
+ 'MD-48': 'md',
21
12
  }),
22
- // No matching props could be found for these Figma properties:
23
- // "initials": figma.string('Initials'),
24
- // "image": figma.instance('Image'),
13
+ initials: figma.string('Initials'),
14
+ image: figma.instance('Image'),
25
15
  // "variant": figma.enum('Variant', {
26
16
  // "Image": "image",
27
17
  // "Initials": "initials",
28
18
  // "Icon": "icon"
29
19
  // })
30
20
  },
31
- example: (props) => <Avatar size={props.size} />,
32
- },
33
- )
21
+ example: props => <Avatar size={props.size} name={props.initials} image={props.image} />,
22
+ }
23
+ );
@@ -2,7 +2,6 @@ import { UserMediumIcon, UserSmallIcon } from '@utilitywarehouse/hearth-react-na
2
2
  import { useEffect, useState } from 'react';
3
3
  import { Image, View } from 'react-native';
4
4
  import { StyleSheet } from 'react-native-unistyles';
5
- import { useTheme } from '../../hooks';
6
5
  import { getInitials } from '../../utils';
7
6
  import BodyText from '../BodyText/BodyText';
8
7
  import AvatarProps, { AvatarLoadingStatus } from './Avatar.props';
@@ -18,7 +17,6 @@ const Avatar = ({
18
17
  }: AvatarProps) => {
19
18
  const [status, setStatus] = useState<AvatarLoadingStatus>('idle');
20
19
  const [isDelayed, setIsDelayed] = useState(delayMs > 0);
21
- const { components } = useTheme();
22
20
 
23
21
  useEffect(() => {
24
22
  if (!src) {
@@ -1,56 +1,47 @@
1
- import React from "react"
2
- import Badge from "./Badge"
3
- import figma from "@figma/code-connect"
1
+ import figma from '@figma/code-connect';
2
+ import { Badge } from '../';
4
3
 
5
- /**
6
- * -- This file was auto-generated by Code Connect --
7
- * `props` includes a mapping from your code props to Figma properties.
8
- * You should check this is correct, and update the `example` function
9
- * to return the code example you'd like to see in Figma
10
- */
11
-
12
- figma.connect(
13
- Badge,
14
- "https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=61%3A652",
15
- {
16
- props: {
17
- // These props were automatically mapped based on your linked code:
18
- variant: figma.enum("Variant", {
19
- "Subtle - Default": "subtle",
20
- Emphasis: "emphasis",
21
- Outline: "outline",
22
- }),
23
- colorScheme: figma.enum("Color Scheme", {
24
- Info: "info",
25
- Positive: "positive",
26
- Danger: "danger",
27
- Warning: "warning",
28
- Functional: "functional",
29
- Energy: "energy",
30
- Broadband: "broadband",
31
- Mobile: "mobile",
32
- Insurance: "insurance",
33
- Cashback: "cashback",
34
- Pig: "pig",
35
- Highlight: "highlight",
36
- }),
37
- size: figma.enum("Size", {
38
- "SM-24": "sm",
39
- "MD-28": "md",
40
- }),
41
- flatBase: figma.boolean("Flat Base?"),
42
- // No matching props could be found for these Figma properties:
43
- // "icon": figma.boolean('Icon?'),
44
- // "icon20": figma.instance('Icon-20'),
45
- // "text": figma.string('Text')
46
- },
47
- example: (props) => (
48
- <Badge
49
- variant={props.variant}
50
- colorScheme={props.colorScheme}
51
- size={props.size}
52
- flatBase={props.flatBase}
53
- />
54
- ),
4
+ figma.connect(Badge, 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=61%3A652', {
5
+ props: {
6
+ variant: figma.enum('Variant', {
7
+ 'Subtle - Default': 'subtle',
8
+ Emphasis: 'emphasis',
9
+ Outline: 'outline',
10
+ }),
11
+ colorScheme: figma.enum('Color Scheme', {
12
+ Info: 'info',
13
+ Positive: 'positive',
14
+ Danger: 'danger',
15
+ Warning: 'warning',
16
+ Functional: 'functional',
17
+ Energy: 'energy',
18
+ Broadband: 'broadband',
19
+ Mobile: 'mobile',
20
+ Insurance: 'insurance',
21
+ Cashback: 'cashback',
22
+ Pig: 'pig',
23
+ Highlight: 'highlight',
24
+ }),
25
+ size: figma.enum('Size', {
26
+ 'SM-24': 'sm',
27
+ 'MD-28': 'md',
28
+ }),
29
+ flatBase: figma.boolean('Flat Base?'),
30
+ icon: figma.boolean('Icon?', {
31
+ true: figma.instance('Icon-20'),
32
+ false: '',
33
+ }),
34
+ text: figma.string('Text'),
55
35
  },
56
- )
36
+ example: props => (
37
+ <Badge
38
+ variant={props.variant}
39
+ colorScheme={props.colorScheme}
40
+ size={props.size}
41
+ flatBase={props.flatBase}
42
+ icon={props.icon}
43
+ >
44
+ {props.text}
45
+ </Badge>
46
+ ),
47
+ });
@@ -1,15 +1,23 @@
1
1
  import figma from '@figma/code-connect';
2
- import Banner from './Banner';
2
+ import { Banner } from '../';
3
3
 
4
- /**
5
- * -- This file was auto-generated by Code Connect --
6
- * None of your props could be automatically mapped to Figma properties.
7
- * You should update the `props` object to include a mapping from your
8
- * code props to Figma properties, and update the `example` function to
9
- * return the code example you'd like to see in Figma
10
- */
11
-
12
- figma.connect(Banner, 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR?node-id=8294%3A3905', {
13
- props: {},
14
- example: props => <Banner heading={null} description={null} />,
15
- });
4
+ figma.connect(
5
+ Banner,
6
+ 'https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components---Tokens?node-id=8294-3905&t=wLfy4ZMrZsHup0oB-4',
7
+ {
8
+ props: {
9
+ // irection: figma.enum('Direction', {
10
+ // Horizontal: 'horizontal',
11
+ // Vertical: 'vertical',
12
+ // }),d
13
+ },
14
+ example: props => {
15
+ return (
16
+ // Banner doesn't need to be wrapped in a Card
17
+ // it's a standalone component in code please see the Banner docs
18
+ // https://hearth.prod.uw.systems/react-native/?path=/docs/components-banner--docs
19
+ <Banner heading="The banner heading" description="The text in the banner" />
20
+ );
21
+ },
22
+ }
23
+ );
@@ -133,11 +133,11 @@ export const WithIllustration: Story = {
133
133
  illustration={
134
134
  <BannerIllustration
135
135
  light={
136
- // @ts-ignore
136
+ // @ts-expect-error - Illustration SVG import
137
137
  <SpotBillingLight width={80} height={80} />
138
138
  }
139
139
  dark={
140
- // @ts-ignore
140
+ // @ts-expect-error - Illustration SVG import
141
141
  <SpotBillingDark width={80} height={80} />
142
142
  }
143
143
  />
@@ -150,11 +150,11 @@ export const WithIllustration: Story = {
150
150
  illustration={
151
151
  <BannerIllustration
152
152
  light={
153
- // @ts-ignore
153
+ // @ts-expect-error - Illustration SVG import
154
154
  <SpotBillingLight width={120} height={120} />
155
155
  }
156
156
  dark={
157
- // @ts-ignore
157
+ // @ts-expect-error - Illustration SVG import
158
158
  <SpotBillingDark width={120} height={120} />
159
159
  }
160
160
  />
@@ -25,7 +25,8 @@ const Banner = ({
25
25
  onPress,
26
26
  onClose,
27
27
  variant = 'subtle',
28
- colorScheme = 'pig',
28
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
29
+ colorScheme: _,
29
30
  style,
30
31
  ...props
31
32
  }: BannerProps) => {