1.0.0 • Published 2 years ago

mesnie-avatar-form v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

AvatarForm

pipeline status coverage report

AvatarForm is a small react package to render a svg avatar and the form to generate it from a customizable dataset.

Installation

yarn add mesnie-avatar-form

AvatarForm usage

import {AvatarForm, defaultData} from "mesnie-avatar-form";

<AvatarForm data={defaultData} />

form example

see AvatarForm/ for implementation details.

FormattedAvatar usage

import {FormattedAvatar, defaultData} from "mesnie-avatar-form";

<FormattedAvatar
    data={defaultData}
    skinColor={"#FF9F9F"}
    hairColor={"#241c11"}
    eyesColor={"#634e34"}
    backgroundColor={"#ecf0f1"}
    hairCutId={"A"}
    beardCutId={"Z"}
    mustacheCutId={"Z"}
    mouthShapeId={"A"}
    noseShapeId={"A"}
    eyesShapeId={"A"}
    browsShapeId={"A"}
    earsShapeId={"A"}
    faceShapeId={"A"}
    bodyShapeId={"A"}
    clothesId={"A"}
/>

avatar example

see FormattedAvatar/ for implementation details.

Contributing

To contribute, you should first fork the project and then

yarn build
yarn start

The AvatarForm will then be displayed on localhost:3000. Next you can add your modifications and test them with yarn test.

License

MIT