1.2.2 • Published 2 years ago

@procore/labs-comments v1.2.2

Weekly downloads
19
License
SEE LICENSE IN LI...
Repository
github
Last release
2 years ago

Comments

The description.

Installation

yarn add @procore/labs-comments

Usage

import * as Comments from '@procore/labs-comments';

const MyComments = () => {
    const today = new Date();
    const comments = [
        {
            author: 'Evan Freymiller',
            title: 'Software Engineer',
            date: today.toString(),
            body: "This is good news, let's try to get the deal in by Friday.",
        },
        {
            author: 'Evan Freymiller',
            title: 'Software Engineer',
            date: today.toString(),
            body: "Sound good, I'll reach out today.",
        },
        {
            author: 'Evan Freymiller',
            title: 'Software Engineer',
            date: today.toString(),
            body: 'Please let me know by the close of business.',
        },
    ];
    return comments.map((comment, index) => (
        <Comment.Container border={index !== 0}>
            <Comment.Header>
                <Comment.Avatar>{comment.author}</Comment.Avatar>
                <Comment.Author date={comment.date}>
                    <Comment.AuthorName>{comment.author}</Comment.AuthorName>
                    <Comment.AuthorJobTitle>{comment.title}</Comment.AuthorJobTitle>
                </Comment.Author>
            </Comment.Header>
            <Comment.Body>{comment.body}</Comment.Body>
        </Comment.Container>
    ));
}

Components


<Container \/>

propstype
childrenreactNode
borderboolean

<Body \/>

propstype
childrenreactNode

<Header \/>

propstype
childrenreactNode

<Author \/>

propstype
dateDate or string
childrenreactNode

<AuthorName \/>

propstype
childrenreactNode

<AuthorJobTitle \/>

propstype
childrenreactNode

<AuthorDate \/>

propstype
childrenreactNode

<Avatar \/>

propstype
childrenstring
urlstring

<Actions \/>

propstype
childrenarray of Action[]
disabledboolean
onSelectfunction

<Action \/>

propstype
onClickfunction
keystring

<Attachment \/>

propstype
fileUrlstring
fileNamestring

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.

1.2.2

2 years ago

1.2.2-alpha

2 years ago

1.2.0

3 years ago

1.2.1

2 years ago

2.0.0-alpha.1

3 years ago

1.1.3

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.1.2

3 years ago

1.1.1-alpha

3 years ago

1.1.0-alpha

3 years ago

1.0.2

3 years ago

1.0.3

3 years ago

1.0.3-alpha.1

3 years ago

1.0.1

3 years ago

1.0.0

4 years ago

0.2.0-alpha.8

4 years ago

0.2.0-alpha.7

4 years ago

0.2.0-alpha.9

4 years ago

0.2.0-alpha.2

4 years ago

0.2.0-alpha.4

4 years ago

0.2.0-alpha.3

4 years ago

0.2.0-alpha.6

4 years ago

0.2.0-alpha.5

4 years ago

0.2.0-alpha.19

4 years ago

0.2.0-alpha.18

4 years ago

0.2.0-alpha.17

4 years ago

0.2.0-alpha.16

4 years ago

0.2.0-alpha.15

4 years ago

0.2.0-alpha.14

4 years ago

0.2.0-alpha.13

4 years ago

0.2.0-alpha.12

4 years ago

0.2.0-alpha.11

4 years ago

0.2.0-alpha.10

4 years ago

1.0.0-alpha

4 years ago

0.1.1

5 years ago

0.1.1-alpha.1

5 years ago

0.1.0-alpha.1

5 years ago