<commit_before>// @flow
import React from "react";
import { action } from "@storybook/addon-actions";
import { storiesOf } from "@storybook/react";
import { withInfo } from "@storybook/addon-info";

import EmptyState from ".";

const twoLinesDescription =
  "Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Etiam porta sem malesuada magna mollis euismod.";

const imgSrc =
  "https://sourcewhatsgood.com/assets/images/utility_images/gallery-third-about-a518a29f64.jpg";

storiesOf("EmptyState", module)
  .add(
    "Default",
    withInfo()(() => (
      <EmptyState title="Empty State Title" description={twoLinesDescription} />
    ))
  )
  .add(
    "Long Title, inside a container",
    withInfo()(() => (
      <div style={{ width: 560, padding: "52px 0" }}>
        <EmptyState
          title={twoLinesDescription}
          description={twoLinesDescription}
        />
      </div>
    ))
  )
  .add(
    "With image",
    withInfo()(() => (
      <EmptyState
        imageSrc={imgSrc}
        title="Empty State Title"
        description={twoLinesDescription}
      />
    ))
  )
  .add(
    "With primary button",
    withInfo()(() => (
      <EmptyState
        imageSrc={imgSrc}
        title="Empty State Title"
        description={twoLinesDescription}
        primaryActionText="Primary Action"
        onPrimaryActionClick={action("clicked")}
      />
    ))
  )
  .add(
    "With primary button, inside a container",
    withInfo()(() => (
      <div style={{ width: 560, padding: "52px 0" }}>
        <EmptyState
          imageSrc={imgSrc}
          title="Empty State Title"
          description={twoLinesDescription}
          primaryActionText="Primary Action"
          onPrimaryActionClick={action("clicked")}
        />
      </div>
    ))
  )
  .add(
    "With primary and secondary buttons",
    withInfo()(() => (
      <EmptyState
        imageSrc={imgSrc}
        title="Empty State Title"
        description={twoLinesDescription}
        primaryActionText="Primary Action"
        onPrimaryActionClick={action("clicked")}
        secondaryActionText="Neutral Action"
        onSecondaryActionClick={action("clicked")}
      />
    ))
  )
  .add(
    "With secondary button only",
    withInfo()(() => (
      <EmptyState
        imageSrc={imgSrc}
        title="Empty State Title"
        description={twoLinesDescription}
        secondaryActionText="Neutral Action"
        onSecondaryActionClick={action("clicked")}
      />
    ))
  )
  .add(
    "With primary button and info",
    withInfo()(() => (
      <EmptyState
        imageSrc={imgSrc}
        title="Empty State Title"
        description={twoLinesDescription}
        primaryActionText="Primary Action"
        onPrimaryActionClick={action("clicked")}
        info={twoLinesDescription}
      />
    ))
  );
<commit_msg>test(stories): use the compiled version of the empty state on storybook<commit_after>// @flow
import React from "react";
import { action } from "@storybook/addon-actions";
import { storiesOf } from "@storybook/react";
import { withInfo } from "@storybook/addon-info";

import EmptyState from "@crave/farmblocks-empty-state";

const twoLinesDescription =
  "Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Etiam porta sem malesuada magna mollis euismod.";

const imgSrc =
  "https://sourcewhatsgood.com/assets/images/utility_images/gallery-third-about-a518a29f64.jpg";

storiesOf("EmptyState", module)
  .add(
    "Default",
    withInfo()(() => (
      <EmptyState title="Empty State Title" description={twoLinesDescription} />
    ))
  )
  .add(
    "Long Title, inside a container",
    withInfo()(() => (
      <div style={{ width: 560, padding: "52px 0" }}>
        <EmptyState
          title={twoLinesDescription}
          description={twoLinesDescription}
        />
      </div>
    ))
  )
  .add(
    "With image",
    withInfo()(() => (
      <EmptyState
        imageSrc={imgSrc}
        title="Empty State Title"
        description={twoLinesDescription}
      />
    ))
  )
  .add(
    "With primary button",
    withInfo()(() => (
      <EmptyState
        imageSrc={imgSrc}
        title="Empty State Title"
        description={twoLinesDescription}
        primaryActionText="Primary Action"
        onPrimaryActionClick={action("clicked")}
      />
    ))
  )
  .add(
    "With primary button, inside a container",
    withInfo()(() => (
      <div style={{ width: 560, padding: "52px 0" }}>
        <EmptyState
          imageSrc={imgSrc}
          title="Empty State Title"
          description={twoLinesDescription}
          primaryActionText="Primary Action"
          onPrimaryActionClick={action("clicked")}
        />
      </div>
    ))
  )
  .add(
    "With primary and secondary buttons",
    withInfo()(() => (
      <EmptyState
        imageSrc={imgSrc}
        title="Empty State Title"
        description={twoLinesDescription}
        primaryActionText="Primary Action"
        onPrimaryActionClick={action("clicked")}
        secondaryActionText="Neutral Action"
        onSecondaryActionClick={action("clicked")}
      />
    ))
  )
  .add(
    "With secondary button only",
    withInfo()(() => (
      <EmptyState
        imageSrc={imgSrc}
        title="Empty State Title"
        description={twoLinesDescription}
        secondaryActionText="Neutral Action"
        onSecondaryActionClick={action("clicked")}
      />
    ))
  )
  .add(
    "With primary button and info",
    withInfo()(() => (
      <EmptyState
        imageSrc={imgSrc}
        title="Empty State Title"
        description={twoLinesDescription}
        primaryActionText="Primary Action"
        onPrimaryActionClick={action("clicked")}
        info={twoLinesDescription}
      />
    ))
  );

{'fraction_non_alphanumeric': 0.1317614424410541, 'fraction_numerical': 0.006588072122052704, 'mean_word_length': 2.5899191039203484, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 43, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4219811', 'n_tokens_mistral': 1698, 'n_tokens_neox': 1659, 'n_words': 353}