@crave/farmblocks-footer

2.5.13 • Public • Published

logo-farmblocks

Farmblocks-Footer

See Storybook image

Design spec

See it on zeplin

Usage

import React, { Component } from "react";
import { render } from "react-dom";
import Footer from "@crave/farmblocks-footer";
import Button, { buttonTypes, buttonSizes } from "@crave/farmblocks-button";

const App = () => (
  <div>
    <Footer
      helpText="Lorem ipsum dolor sit amet, consectetur adipiscing elit"
      helpLinkHref="#"
      helpLinkText="Get support"
      actions={[
        <Button
          onClick={() => console.log("handle onCancelClick")}
          size={buttonSizes.MEDIUM}
          text="Cancel"
          key="cancel"
        />,
        <Button
          onClick={() => console.log("handle onSaveClick")}
          type={buttonTypes.PRIMARY}
          size={buttonSizes.MEDIUM}
          text="Save"
          key="save"
        />
      ]}
    />
  </div>
);

render(<App />, document.getElementById("root"));

API

Helper section:

  • helpText: string (required)
  • helpLinkText: string (required)
  • helpLinkHref: string (required)

Action section:

  • actions: array of dom nodes

See it in the source

License

MIT

Package Sidebar

Install

npm i @crave/farmblocks-footer

Weekly Downloads

8

Version

2.5.13

License

MIT

Unpacked Size

36 kB

Total Files

8

Last publish

Collaborators

  • viniciusmartin
  • luis.nascimento
  • seocam
  • vnakamura
  • alcferreira
  • imwra