@sproutsocial/racine 11.3.0-beta.1 → 11.3.1-beta-deps.1

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 (43) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/__flow__/Badge/constants.js +48 -0
  3. package/__flow__/Badge/index.js +60 -33
  4. package/__flow__/Badge/index.stories.js +35 -42
  5. package/__flow__/Badge/index.test.js +34 -32
  6. package/__flow__/Badge/styles.js +22 -42
  7. package/__flow__/Button/index.js +1 -0
  8. package/__flow__/Button/index.stories.js +51 -67
  9. package/__flow__/EmptyState/index.test.js +1 -1
  10. package/__flow__/Input/index.js +67 -116
  11. package/__flow__/Input/index.stories.js +0 -33
  12. package/__flow__/Input/index.test.js +1 -199
  13. package/__flow__/Input/styles.js +1 -1
  14. package/__flow__/Menu/__snapshots__/index.test.js.snap +3 -3
  15. package/__flow__/setupTests.js +1 -1
  16. package/__flow__/systemProps/tests/__snapshots__/layout.test.js.snap +0 -14
  17. package/__flow__/systemProps/tests/layout.test.js +0 -9
  18. package/__flow__/themes/extendedThemes/README.md +6 -0
  19. package/commonjs/Badge/constants.js +43 -0
  20. package/commonjs/Badge/index.js +41 -39
  21. package/commonjs/Badge/styles.js +15 -31
  22. package/commonjs/Button/index.js +1 -0
  23. package/commonjs/DatePicker/styles.js +5 -1
  24. package/commonjs/Input/index.js +30 -66
  25. package/commonjs/Input/styles.js +1 -1
  26. package/commonjs/Menu/index.js +10 -10
  27. package/commonjs/Modal/styles.js +5 -1
  28. package/commonjs/Toast/index.js +14 -14
  29. package/commonjs/Toast/styles.js +5 -2
  30. package/lib/Badge/constants.js +38 -0
  31. package/lib/Badge/index.js +38 -39
  32. package/lib/Badge/styles.js +12 -27
  33. package/lib/Button/index.js +1 -0
  34. package/lib/DatePicker/styles.js +5 -1
  35. package/lib/Input/index.js +29 -59
  36. package/lib/Input/styles.js +1 -1
  37. package/lib/Menu/index.js +11 -10
  38. package/lib/Modal/styles.js +5 -1
  39. package/lib/Toast/index.js +14 -14
  40. package/lib/Toast/styles.js +5 -1
  41. package/package.json +25 -21
  42. package/__flow__/Button/__snapshots__/index.test.js.snap +0 -511
  43. package/__flow__/Button/index.test.js +0 -113
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Change Log
2
2
 
3
+ ## 11.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 514d738: Patch badge component flow issue
8
+
9
+ ## 11.2.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 9cc377e: Created extended theme directory
14
+
15
+ ## 11.2.1
16
+
17
+ ### Patch Changes
18
+
19
+ - 6968733: adds deprecation messaging to typeProps to be displayed on seeds page
20
+
21
+ ## 11.2.0
22
+
23
+ ### Minor Changes
24
+
25
+ - a71a431: backwards compatible style and api changes to the badge component
26
+
3
27
  ## 11.1.2
4
28
 
5
29
  ### Patch Changes
@@ -0,0 +1,48 @@
1
+ //@flow
2
+
3
+ const defaultPurple = {
4
+ color: "colors.text.body",
5
+ background: "colors.container.background.decorative.purple",
6
+ };
7
+
8
+ const suggestion = {
9
+ color: "colors.text.body",
10
+ background: "colors.container.background.decorative.blue",
11
+ };
12
+
13
+ const passive = {
14
+ color: "colors.text.body",
15
+ background: "colors.container.background.decorative.neutral",
16
+ };
17
+
18
+ const primary = {
19
+ color: "colors.text.body",
20
+ background: "colors.container.background.decorative.blue",
21
+ };
22
+
23
+ const secondary = {
24
+ color: "colors.text.body",
25
+ background: "colors.container.background.decorative.yellow",
26
+ };
27
+
28
+ const common = {
29
+ color: "colors.text.inverse",
30
+ background: "colors.aqua.600",
31
+ };
32
+
33
+ const approval = {
34
+ color: "colors.text.body",
35
+ background: "colors.container.background.decorative.orange",
36
+ };
37
+
38
+ //Deprecated former "types"
39
+
40
+ export const legacyBadgeColors = {
41
+ primary,
42
+ secondary,
43
+ passive,
44
+ common,
45
+ approval,
46
+ default: defaultPurple,
47
+ suggestion,
48
+ };
@@ -1,43 +1,70 @@
1
1
  // @flow
2
2
  import * as React from "react";
3
+ import Icon from "../Icon";
3
4
  import Container from "./styles";
5
+ import Box from "../Box";
4
6
 
5
7
  type TypeProps = {
6
- text: React.Node,
7
- type:
8
- | "primary"
9
- | "secondary"
10
- | "passive"
11
- | "common"
12
- | "approval"
13
- | "default"
14
- | "suggestion",
15
- size: "default" | "small",
8
+ children?: React.Node,
9
+ /** DEPRECATED: Use children instead of text */
10
+ text?: React.Node,
11
+ /** Size default is deprecated in favor of small and large */
12
+ size?: "small" | "large" | "default",
13
+ badgeColor?:
14
+ | "green"
15
+ | "blue"
16
+ | "purple"
17
+ | "yellow"
18
+ | "orange"
19
+ | "red"
20
+ | "neutral",
21
+ iconName?: string,
22
+ /** DEPRECATED: Possibly only used for testing. Refrain from using at all if possible. (optional) */
16
23
  tip?: React.Node,
24
+ /** DEPRECATED: The legacy method of choosing a theme. Use badgeColor instead. (optional) */
25
+ type?: string,
17
26
  };
18
27
 
19
- export default class Badge extends React.Component<TypeProps> {
20
- static defaultProps = {
21
- type: "primary",
22
- size: "default",
23
- };
24
-
25
- render() {
26
- const { size, type, tip, text, ...rest } = this.props;
27
-
28
- return (
29
- <Container
30
- type={type}
31
- small={size === "small"}
32
- data-tip={tip}
33
- data-qa-badge={text || ""}
34
- data-qa-badge-type={type}
35
- data-qa-badge-tip={tip || ""}
36
- // $FlowIssue - upgrade v0.112.0
37
- {...rest}
38
- >
39
- {text}
40
- </Container>
28
+ const Badge = ({
29
+ children,
30
+ text,
31
+ iconName,
32
+ type,
33
+ tip,
34
+ size = "small",
35
+ badgeColor = "blue",
36
+ ...rest
37
+ }: TypeProps) => {
38
+ if (children && text) {
39
+ throw new Error(
40
+ "can't use both `children` and `text` props. Text is deprecated, consider using children."
41
41
  );
42
42
  }
43
- }
43
+
44
+ return (
45
+ <Container
46
+ {...rest}
47
+ // size previously included default, which currently maps to small. Once consumers have updated this can be simplified.
48
+ size={size === "default" ? "large" : size}
49
+ badgeColor={badgeColor}
50
+ data-tip={tip}
51
+ data-qa-badge={text || ""}
52
+ data-qa-badge-type={type}
53
+ data-qa-badge-tip={tip || ""}
54
+ type={type && type}
55
+ >
56
+ <Box display="flex" alignItems="center" JustifyContent="center">
57
+ {iconName ? (
58
+ <Icon
59
+ mr={200}
60
+ name={iconName}
61
+ size={size === "small" ? "mini" : "default"}
62
+ />
63
+ ) : null}
64
+ {children || text}
65
+ </Box>
66
+ </Container>
67
+ );
68
+ };
69
+
70
+ export default Badge;
@@ -1,53 +1,46 @@
1
1
  import React from "react";
2
- import { text } from "@storybook/addon-knobs";
3
2
  import Badge from "./index";
3
+ import Box from "../Box";
4
+ import Numeral from "../Numeral";
5
+ import Text from "../Text";
6
+ import Stack from "../Stack";
4
7
 
5
8
  export default {
6
9
  title: "Badge",
7
10
  };
8
11
 
9
12
  export const permutations = () => (
10
- <>
11
- <Badge
12
- text={text("text", "Test")}
13
- type="default"
14
- size={text("size", "small")}
15
- />
16
- <Badge text={text("text", "Test")} size={text("size", "small")} />
17
- <Badge
18
- text={text("text", "Test")}
19
- type="secondary"
20
- size={text("size", "small")}
21
- />
22
- <Badge
23
- text={text("text", "Test")}
24
- type="passive"
25
- size={text("size", "small")}
26
- />
27
- <Badge
28
- text={text("text", "Test")}
29
- type="common"
30
- size={text("size", "small")}
31
- />
32
- <Badge
33
- text={text("text", "Test")}
34
- type="approval"
35
- size={text("size", "small")}
36
- />
37
- <Badge
38
- text={text("text", "Test")}
39
- type="suggestion"
40
- size={text("size", "small")}
41
- />
42
-
43
- <Badge text={text("text", "Test")} type="default" />
44
- <Badge text={text("text", "Test")} />
45
- <Badge text={text("text", "Test")} type="secondary" />
46
- <Badge text={text("text", "Test")} type="passive" />
47
- <Badge text={text("text", "Test")} type="common" />
48
- <Badge text={text("text", "Test")} type="approval" />
49
- <Badge text={text("text", "Test")} type="suggestion" />
50
- </>
13
+ <Stack space={450}>
14
+ <Box display="flex" alignItems="center">
15
+ <Badge badgeColor="green">Badge</Badge>
16
+ <Badge>Badge</Badge>
17
+ <Badge badgeColor="purple">Badge</Badge>
18
+ <Badge badgeColor="yellow">Badge</Badge>
19
+ <Badge badgeColor="orange">Badge</Badge>
20
+ <Badge badgeColor="red">Badge</Badge>
21
+ <Badge badgeColor="neutral" iconName="atom">
22
+ Badge
23
+ </Badge>
24
+ <Badge
25
+ size="small"
26
+ type="default"
27
+ bg="chartreuse"
28
+ color="crimson"
29
+ p={500}
30
+ >
31
+ Radical overrides!
32
+ </Badge>
33
+ </Box>
34
+ <Box display="flex" alignItems="center">
35
+ <Badge size="large" type="secondary" iconName="sparkles">
36
+ Supports legacy types
37
+ </Badge>
38
+ <Badge size="large">
39
+ <Numeral fontWeight="bold" number={1569241} />
40
+ <Text ml={200}>and children!</Text>
41
+ </Badge>
42
+ </Box>
43
+ </Stack>
51
44
  );
52
45
 
53
46
  permutations.story = {
@@ -3,48 +3,50 @@ import Badge from "./";
3
3
  import { render } from "../utils/react-testing-library";
4
4
  import "jest-styled-components";
5
5
 
6
- describe("Racine Badge", () => {
7
- it("should render with default props", () => {
8
- const { getByText, getByDataQaLabel } = render(<Badge text="Test" />);
6
+ describe("Badge...", () => {
7
+ it("...should render with default props", () => {
8
+ const { getByText } = render(<Badge>Test</Badge>);
9
9
  expect(getByText("Test")).toBeTruthy();
10
- expect(getByDataQaLabel({ "badge-type": "primary" })).toBeTruthy();
10
+ expect(getByText("Test").closest("span")).toHaveStyleRule(
11
+ "padding",
12
+ "0px 4px"
13
+ );
14
+ expect(getByText("Test").closest("span")).toHaveStyleRule(
15
+ "background",
16
+ "#dcf2ff"
17
+ );
11
18
  });
12
19
 
13
- it("should render with correct size styling", () => {
14
- const { getByText } = render(<Badge text="Test" size="small" />);
15
- expect(getByText("Test")).toHaveStyleRule("padding", "4px 8px");
20
+ it("...should render with correct size styling", () => {
21
+ const { getByText } = render(<Badge size="large">Test</Badge>);
22
+ expect(getByText("Test").closest("span")).toHaveStyleRule("padding", "8px");
16
23
  });
17
24
 
18
- it("should render with secondary type", () => {
19
- const { getByText, getByDataQaLabel } = render(
20
- <Badge text="Test" type="secondary" />
21
- );
25
+ it("...should render with legacy type", () => {
26
+ const { getByText } = render(<Badge type="secondary">Test</Badge>);
22
27
  expect(getByText("Test")).toBeTruthy();
23
- expect(getByDataQaLabel({ "badge-type": "secondary" })).toBeTruthy();
24
- });
25
-
26
- it("should render with passive type", () => {
27
- const { getByText, getByDataQaLabel } = render(
28
- <Badge text="Test" type="passive" />
28
+ expect(getByText("Test").closest("span")).toHaveStyleRule(
29
+ "color",
30
+ "#364141"
31
+ );
32
+ expect(getByText("Test").closest("span")).toHaveStyleRule(
33
+ "background",
34
+ "#fdefcd"
29
35
  );
30
- expect(getByText("Test")).toBeTruthy();
31
- expect(getByDataQaLabel({ "badge-type": "passive" })).toBeTruthy();
32
36
  });
33
37
 
34
- it("should render with common type", () => {
35
- const { getByText, getByDataQaLabel } = render(
36
- <Badge text="Test" type="common" />
37
- );
38
+ it("...should render with a badge color", () => {
39
+ const { getByText } = render(<Badge badgeColor="purple">Test</Badge>);
38
40
  expect(getByText("Test")).toBeTruthy();
39
- expect(getByDataQaLabel({ "badge-type": "common" })).toBeTruthy();
41
+ expect(getByText("Test").closest("span")).toHaveStyleRule(
42
+ "background",
43
+ "#eaeaf9"
44
+ );
40
45
  });
41
46
 
42
- it("should render with approval type", () => {
43
- const { getByText, getByDataQaLabel } = render(
44
- <Badge text="Test" type="approval" />
45
- );
46
- expect(getByText("Test")).toBeTruthy();
47
- expect(getByDataQaLabel({ "badge-type": "approval" })).toBeTruthy();
47
+ it("...should render with an icon", () => {
48
+ const { container } = render(<Badge iconName="sparkles">Test</Badge>);
49
+ expect(container.querySelector("svg")).toBeTruthy();
48
50
  });
49
51
  it("should render with suggestion type", () => {
50
52
  const { getByText, getByDataQaLabel } = render(
@@ -54,9 +56,9 @@ describe("Racine Badge", () => {
54
56
  expect(getByDataQaLabel({ "badge-type": "suggestion" })).toBeTruthy();
55
57
  });
56
58
 
57
- it("should render with tooltip class", () => {
59
+ it("...should render with tooltip class", () => {
58
60
  const { getByText, getByDataQaLabel } = render(
59
- <Badge text="Test" tip="test tip" />
61
+ <Badge tip="test tip">Test</Badge>
60
62
  );
61
63
  expect(getByText("Test")).toBeTruthy();
62
64
  expect(getByDataQaLabel({ "badge-tip": "test tip" })).toBeTruthy();
@@ -1,51 +1,31 @@
1
1
  //@flow
2
- import styled, { css, type StyledComponent } from "styled-components";
2
+ import styled, { type StyledComponent } from "styled-components";
3
3
  import { COMMON } from "../utils/system-props";
4
- import { themeGet } from "@styled-system/theme-get";
5
-
6
4
  import type { TypeTheme } from "../types/theme.flow";
7
-
8
- const colors = {
9
- primary: "colors.neutral.0",
10
- secondary: "colors.neutral.800",
11
- passive: "colors.neutral.800",
12
- common: "colors.neutral.0",
13
- approval: "colors.neutral.800",
14
- default: "colors.neutral.0",
15
- suggestion: "colors.neutral.900",
16
- };
17
-
18
- const backgroundColors = {
19
- primary: "colors.blue.700",
20
- secondary: "colors.yellow.500",
21
- passive: "colors.neutral.200",
22
- common: "colors.aqua.600",
23
- approval: "colors.orange.300",
24
- default: "colors.purple.700",
25
- suggestion: "colors.blue.300",
26
- };
5
+ import { themeGet } from "@styled-system/theme-get";
6
+ import { legacyBadgeColors } from "./constants";
27
7
 
28
8
  // eslint-disable-next-line prettier/prettier
29
- const Container: StyledComponent<{type: "primary" | "secondary" | "passive" | "common" | "approval" | "default" | "suggestion", small: boolean, ...}, TypeTheme, *> = styled.span`
9
+ const Container: StyledComponent<{type: ?string, badgeColor: string, size: string, ...}, TypeTheme, *> = styled.span`
10
+ font-family: ${(p) => p.theme.fontFamily};
11
+ ${(p) =>
12
+ p.size === "small" ? p.theme.typography[100] : p.theme.typography[200]};
13
+ border-radius: 9999px;
14
+ line-height: 16px;
30
15
  display: inline-block;
31
- text-align: center;
32
- border-radius: 50px;
33
- font-family: ${(props) => props.theme.fontFamily};
34
-
35
- padding: ${(props) =>
36
- props.small
37
- ? `${props.theme.space[200]} ${props.theme.space[300]}`
38
- : `${props.theme.space[300]} ${props.theme.space[350]}`};
39
-
40
- ${(props) =>
41
- props.small ? props.theme.typography[100] : props.theme.typography[200]}
42
-
43
- ${(props) => css`
44
- color: ${themeGet(colors[props.type])(props)};
45
- background: ${themeGet(backgroundColors[props.type])(props)};
46
- `}
47
-
48
- ${COMMON}
16
+ color: ${(p) =>
17
+ p.type
18
+ ? themeGet(legacyBadgeColors[p.type].color)
19
+ : p.theme.colors.text.body};
20
+ background: ${(p) =>
21
+ p.type
22
+ ? themeGet(legacyBadgeColors[p.type].background)
23
+ : p.theme.colors.container.background.decorative[p.badgeColor]};
24
+ padding: ${(p) =>
25
+ p.size === "small"
26
+ ? `${p.theme.space[0]} ${p.theme.space[200]}`
27
+ : `${p.theme.space[300]}`};
28
+ ${COMMON};
49
29
  `;
50
30
 
51
31
  export default Container;
@@ -60,6 +60,7 @@ const Button = ({
60
60
 
61
61
  return (
62
62
  <Container
63
+ className="container"
63
64
  title={title}
64
65
  active={active}
65
66
  href={href}
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
- import { boolean, text, number } from "@storybook/addon-knobs";
3
2
  import Button from "./index";
4
3
  import Icon from "../Icon";
5
4
  import Box from "../Box";
@@ -8,155 +7,140 @@ export default {
8
7
  title: "Button",
9
8
  };
10
9
 
11
- export const defaultStory = () => (
12
- <Button
13
- appearance={text("appearance", "default")}
14
- onClick={() => alert("Testing...")}
15
- >
10
+ export const defaultStory = (args) => (
11
+ <Button {...args} onClick={() => alert("Testing...")}>
16
12
  Default
17
13
  </Button>
18
14
  );
19
15
 
16
+ defaultStory.args = { appearance: "default" };
17
+
20
18
  defaultStory.story = {
21
19
  name: "Default",
22
20
  };
23
21
 
24
- export const primary = () => (
25
- <Button
26
- appearance={text("appearance", "primary")}
27
- onClick={() => alert("Testing...")}
28
- >
22
+ export const primary = (args) => (
23
+ <Button {...args} onClick={() => alert("Testing...")}>
29
24
  Primary Button
30
25
  </Button>
31
26
  );
32
27
 
28
+ primary.args = { appearance: "primary" };
29
+
33
30
  primary.story = {
34
31
  name: "Primary",
35
32
  };
36
33
 
37
- export const secondary = () => (
38
- <Button appearance={text("appearance", "secondary")}>Secondary Button</Button>
39
- );
34
+ export const secondary = (args) => <Button {...args}>Secondary Button</Button>;
35
+
36
+ secondary.args = { appearance: "secondary" };
40
37
 
41
38
  secondary.story = {
42
39
  name: "Secondary",
43
40
  };
44
41
 
45
- export const destructive = () => (
46
- <Button appearance={text("appearance", "destructive")}>
47
- Destructive Button
48
- </Button>
42
+ export const destructive = (args) => (
43
+ <Button {...args}>Destructive Button</Button>
49
44
  );
50
45
 
46
+ destructive.args = { appearance: "destructive" };
51
47
  destructive.story = {
52
48
  name: "Destructive",
53
49
  };
54
50
 
55
- export const placeholder = () => (
56
- <Button appearance={text("appearance", "placeholder")}>
57
- Placeholder Button
58
- </Button>
51
+ export const placeholder = (args) => (
52
+ <Button {...args}>Placeholder Button</Button>
59
53
  );
60
54
 
55
+ placeholder.args = { appearance: "placeholder" };
61
56
  placeholder.story = {
62
57
  name: "Placeholder",
63
58
  };
64
59
 
65
- export const largeButton = () => (
66
- <Button
67
- appearance={text("appearance", "primary")}
68
- size={text("size", "large")}
69
- >
70
- Large Button
71
- </Button>
72
- );
60
+ export const largeButton = (args) => <Button {...args}>Large Button</Button>;
61
+ largeButton.args = { size: "large", appearance: "primary" };
73
62
 
74
63
  largeButton.story = {
75
64
  name: "Large button",
76
65
  };
77
66
 
78
- export const pillButton = () => (
67
+ export const pillButton = (args) => (
79
68
  <Box bg="container.background.base" p={400}>
80
- <Button appearance={text("shape", "pill")}>
69
+ <Button {...args}>
81
70
  <Icon name="reply" mr={350} />
82
71
  Pill Button
83
72
  </Button>
84
73
  </Box>
85
74
  );
86
-
75
+ pillButton.args = { appearance: "pill" };
87
76
  pillButton.story = {
88
77
  name: "Pill button",
89
78
  };
90
79
 
91
- export const pillIconOnlyButton = () => (
80
+ export const pillIconOnlyButton = (args) => (
92
81
  <Box bg="container.background.base" p={400}>
93
- <Button appearance={text("shape", "pill")} ariaLabel="This is a label">
82
+ <Button {...args} ariaLabel="This is a label">
94
83
  <Icon name="circle-check-outline" />
95
84
  </Button>
96
85
  </Box>
97
86
  );
98
87
 
88
+ pillIconOnlyButton.args = { appearance: "pill" };
99
89
  pillIconOnlyButton.story = {
100
90
  name: "Pill icon only button",
101
91
  };
102
92
 
103
- export const activeButton = () => (
104
- <Button
105
- appearance={text("appearance", "secondary")}
106
- active={boolean("active", true)}
107
- >
108
- Active Button
109
- </Button>
110
- );
93
+ export const activeButton = (args) => <Button {...args}>Active Button</Button>;
111
94
 
95
+ activeButton.args = { appearance: "secondary", active: true };
112
96
  activeButton.story = {
113
97
  name: "Active button",
114
98
  };
115
99
 
116
- export const buttonAsALink = () => (
117
- <Button
118
- href={text("href", "http://sproutsocial.style")}
119
- external={boolean("external", true)}
120
- appearance={text("appearance", "primary")}
121
- >
122
- Button using anchor element
123
- </Button>
100
+ export const buttonAsALink = (args) => (
101
+ <Button {...args}>Button using anchor element</Button>
124
102
  );
125
-
103
+ buttonAsALink.args = {
104
+ appearance: "primary",
105
+ external: true,
106
+ href: "http://sproutsocial.style",
107
+ };
126
108
  buttonAsALink.story = {
127
109
  name: "Button as a link",
128
110
  };
129
111
 
130
- export const disabledButton = () => (
131
- <Button
132
- appearance={text("appearance", "primary")}
133
- disabled={text("disabled", "true")}
134
- >
135
- This Button is disabled
136
- </Button>
112
+ export const disabledButton = (args) => (
113
+ <Button {...args}>This Button is disabled</Button>
137
114
  );
138
-
115
+ disabledButton.args = {
116
+ appearance: "primary",
117
+ disabled: true,
118
+ };
139
119
  disabledButton.story = {
140
120
  name: "Disabled button",
141
121
  };
142
122
 
143
- export const fullWidthButton = () => (
144
- <Button appearance={text("appearance", "primary")} width={number("width", 1)}>
145
- Full-Width Button
146
- </Button>
123
+ export const fullWidthButton = (args) => (
124
+ <Button {...args}>Full-Width Button</Button>
147
125
  );
148
-
126
+ fullWidthButton.args = {
127
+ appearance: "primary",
128
+ width: 1,
129
+ };
149
130
  fullWidthButton.story = {
150
131
  name: "Full width button",
151
132
  };
152
133
 
153
- export const withIcon = () => (
154
- <Button appearance={text("appearance", "secondary")}>
134
+ export const withIcon = (args) => (
135
+ <Button {...args}>
155
136
  <Icon name="twitter" mr={350} />
156
137
  Secondary Button
157
138
  </Button>
158
139
  );
159
140
 
141
+ withIcon.args = {
142
+ appearance: "secondary",
143
+ };
160
144
  withIcon.story = {
161
145
  name: "With icon",
162
146
  };
@@ -105,7 +105,7 @@ describe("EmptyState", () => {
105
105
  <EmptyState
106
106
  media={
107
107
  <Image
108
- alt="No assets matching yoursearch or filters"
108
+ alt="No assets matching your search or filters"
109
109
  src="https://cl.ly/db498c7682df/download/analytics.svg"
110
110
  m={0}
111
111
  />