0.1.1-types.10 • Published 5 years ago

@procore/labs-card-layout v0.1.1-types.10

Weekly downloads
85
License
SEE LICENSE IN LI...
Repository
github
Last release
5 years ago

Card Layout

A Card Layout API, which has built in predefined padding, and various child components available for consumption including, company logo, edit button, title, subtitle, and content components.

Installation

yarn add @procore/labs-card-layout

Usage

import * as CardLayout from '@procore/labs-card-layout'

const MyComponent = () => (
  <CardLayout.Container>
    <CardLayout.Header>
      <CardLayout.Logo url="https://www.procore.com/logo" />
      <CardLayout.TitleContainer>
        <CardLayout.SubTitle>Overview</CardLayout.SubTitle>
        <CardLayout.Title>Allen Construction</CardLayout.Title>
      </CardLayout.TitleContainer>
      <CardLayout.Edit
        canEdit
        onClick={() => alert('clicked')}
        label="Edit"
        tooltip="Edit Profile"
        tooltipPlacement="bottom"
      />
    </CardLayout.Header>
    <CardLayout.Body>
      Location for content to go. Pass any component to me.
    </CardLayout.Body>
  </CardLayout.Container>
)

Components

<Container \/>

propstype
childrenreactNode
classNamestring

<Body \/>

propstype
childrenreactNode
classNamestring

<Header \/>

propstype
childrenreactNode
actionreactNode
statusreactNode

<TitleContainer \/>

propstype
childrenreactNode

<Title \/>

propstype
childrenreactNode
classNamestring

<SubTitle \/>

propstype
childrenreactNode

<Edit \/>

propstype
labelstring
canEditboolean
onClickfunction
tooltipstring
tooltipPlacementstring

<Logo \/>

propstype
urlstring

Testing

yarn test

Dependencies

@procore/core-react and react are listed as external peer dependencies. The package will not bundle the code, and requires the app client to provide it as a dependency. The external peer dep is to assure React Context is consistent in a client's React tree, the child consumers can reference the correct parent provider. If the package uses latest features or bug fixes and a new minimum version of core-react is required, it should be considered a breaking change as the peer dependency version must be met.

0.1.1-types.10

5 years ago

0.1.1-types.8

5 years ago

0.1.1-types.7

5 years ago

0.1.1-types.6

5 years ago

0.1.1-types.5

5 years ago

0.1.1-types.4

5 years ago

0.1.1-types.3

5 years ago

0.1.1-types.2

5 years ago

0.1.1-types.1

5 years ago

0.1.1

5 years ago

0.1.1-alpha.4

5 years ago

0.1.1-alpha.3

5 years ago

0.1.1-alpha.2

5 years ago

0.1.1-alpha.0

5 years ago