GithubHelp home page GithubHelp logo

afrin127329 / ebayui-core-react Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ebay/ebayui-core-react

0.0 0.0 0.0 7.01 MB

eBayUI React components

Home Page: https://opensource.ebay.com/ebayui-core-react/main/index.html

License: MIT License

Shell 0.01% JavaScript 2.21% TypeScript 97.77% HTML 0.01%

ebayui-core-react's Introduction

ebayui-core-react

eBayUI React components

Demo

Requirements

eBayUI Components

Getting Started

These react components are available as @ebay/ui-core-react package on NPM.

Use npm or yarn to add the package dependency to your project:

yarn add @ebay/ui-core-react

for quick development/POC

import { EbayTextbox, EbayButton } from '@ebay/ui-core-react'

<EbayTextbox placeholder="Enter text here" />
<EbayButton>Submit</EbayButton>

for smaller bundle size

import { EbayTextbox } from '@ebay/ui-core-react/ebay-textbox'
import { EbayButton } from '@ebay/ui-core-react/ebay-button'

<EbayTextbox placeholder="Enter text here" />
<EbayButton>Submit</EbayButton>

Notes

If you render children components dynamically and don't want to get React key warnings then provide a key:

<EbayParentComponent>
    {items.map((item, index) => <EbayChildComponent key={index}>{item}</EbayChildComponent>)}
</EbayParentComponent>

IE-10/11 (deprecated)

You will need polyfills for IE. Recommended approach is using core-js with or without babel.

To manually use polyfills you need to import them:

import 'core-js/stable/object/values'

Object.values({ a: 'Hello' }).map(console.log)

But we suggest to use polyfills automatically by editing your .babelrc:

{
    "presets": [
        [
            "@babel/preset-env",
            {
                "useBuiltIns": "usage",
                "corejs": "3",
                "targets": {
                    "Chrome": 87,
                    "Firefox": 78,
                    "Safari": 11,
                    "Edge": 103,
                    "Opera": 89,
                    "ChromeAndroid": 83,
                    "ios_saf": 12
                }
            }
        ]
    ]
}

targets can also be something like "> 0.2%, not dead"

Issues

Create an issue on github

Contributing

Write an email to [email protected]

How to update icons on skin changes

This will update EbaySvg and EbayIcon components:

yarn update-icons

Quick guidance for contribution:

  • Create a feature branch git checkout -b features/new-component
  • yarn install to install dependencies
  • Add documentations:
    • README.md on component level
    • Unit test
    • Storybook file for snapshot tests and also component showcase/demo
  • Make your changes pass the:
    • yarn lint. You can do yarn lint --fix to automatically fix small lint issues (e.g indentation, whitespace, semicolons, ...)
    • yarn test. Do yarn test -u to automatically the snapshot tests.

Requirements for new component

If you implement a new component, make sure that it complies with eBay UI guidelines:

One way to comply those guidelines is to implement your new component as similiar as possible with the Marko eBayUI Core, or port the Marko implementation to React. This means the new component should:

  • Output the same HTML structure
  • Have similiar behaviour (e.g open menu dropdown on click and keyboard)
  • Support the same attributes (e.g ebay-breadcrumb a11y-heading-text, or ebay-button priority)
  • Support the same events (e.g ebay-select select-change). Since React does not use event emitter (unlike Marko), one can implement this as a prop with Function.

Changelog

@ebay/ui-core-react

version 4.x (Skin 16, breaking changes in icon names)

version 3.x (Skin 15, some breaking changes in dialog components)

version 2.x (Skin 15)

@ebay/ebayui-core-react

version 10.x (Skin 14)

version 9.x (skin 13)

ebayui-core-react

version 8.x (skin 12)

version 6.x (skin 10)

version 5.x (removed less, changed imports to minimize bundle size)

version 3.x (skin 9, react 16.8 with hooks support)

version 2.x (skin 7, react 16.7)

legacy

ebayui-core-react's People

Contributors

aaron-nance avatar abhigyan-pandey avatar abiyasa avatar darkwebdev avatar dependabot[bot] avatar don-siu avatar flakronkadriu avatar gh-action-bump-version avatar henriquelimas avatar joinfelipe avatar kristopherrollert avatar marcial199545 avatar montoya332 avatar praveengh1 avatar raveenakothapally avatar shpandian avatar vshrivastav13 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.