1.0.0-alpha.46 • Published 8 months ago

@easypost/easy-ui v1.0.0-alpha.46

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

Easy UI

Easy UI is a component library designed to help developers create the best experience for shippers who use EasyPost.

Installation

Run the following command using npm:

npm install @easypost/easy-ui --save

Usage

  1. EasyUI uses Poppins as its primary font. Include Poppins and its declarations in your setup. You can host it yourself or use Google Fonts. All fonts are included in .storybook/public/fonts/poppins for self-hosting.
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src:
    url("/fonts/poppins/poppins-v20-latin-400.woff2") format("woff2"),
    url("/fonts/poppins/poppins-v20-latin-400.woff") format("woff");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src:
    url("/fonts/poppins/poppins-v20-latin-500.woff2") format("woff2"),
    url("/fonts/poppins/poppins-v20-latin-500.woff") format("woff");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src:
    url("/fonts/poppins/poppins-v20-latin-600.woff2") format("woff2"),
    url("/fonts/poppins/poppins-v20-latin-600.woff") format("woff");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src:
    url("/fonts/poppins/poppins-v20-latin-700.woff2") format("woff2"),
    url("/fonts/poppins/poppins-v20-latin-700.woff") format("woff");
}
  1. Import the CSS directly into your project if your asset packager supports it:
import "@easypost/easy-ui/style.css";
  1. Include the provider and any relevant components in your project:
import { Provider as EasyUIProvider } from "@easypost/easy-ui/Provider";
  1. Tell React to render the element in the DOM:
ReactDOM.render(
  <EasyUIProvider>
    <div>{/* More to come */}</div>
  </EasyUIProvider>,
  document.querySelector("#app"),
);

Server Rendering

When server rendering an app that uses Easy UI and React <18, your app must be wrapped with a single instance of React Aria's SSRProvider. If an app is using an additional version of React Aria, ensure there's only one version of @react-aria/ssr using NPM's overrides or Yarn's resolutions property.

Development

We use Storybook to create a simple, hot-reloading playground for development on these components.

Commands

CommandRuns
npm run buildBuilds the project
npm run cleanRemoves temp directories
npm run lintLints the project (ESLint, Stylelint, Prettier)
npm run testTests the project
npm run test:watchTests the project in watch mod
1.0.0-alpha.46

8 months ago

1.0.0-alpha.45

8 months ago

1.0.0-alpha.39

1 year ago

1.0.0-alpha.41

11 months ago

1.0.0-alpha.40

12 months ago

1.0.0-alpha.43

10 months ago

1.0.0-alpha.42

10 months ago

1.0.0-alpha.44

9 months ago

1.0.0-alpha.38

1 year ago

1.0.0-alpha.37

1 year ago

1.0.0-alpha.36

1 year ago

1.0.0-alpha.35

1 year ago

1.0.0-alpha.34

1 year ago

1.0.0-alpha.33

1 year ago

1.0.0-alpha.32

1 year ago

1.0.0-alpha.31

1 year ago

1.0.0-alpha.30

1 year ago

1.0.0-alpha.29

1 year ago

1.0.0-alpha.28

1 year ago

1.0.0-alpha.27

1 year ago

1.0.0-alpha.26

1 year ago

1.0.0-alpha.25

1 year ago

1.0.0-alpha.24

1 year ago

1.0.0-alpha.23

1 year ago

1.0.0-alpha.22

1 year ago

1.0.0-alpha.21

2 years ago

1.0.0-alpha.20

2 years ago

1.0.0-alpha.19

2 years ago

1.0.0-alpha.9

2 years ago

1.0.0-alpha.8

2 years ago

1.0.0-alpha.7

2 years ago

1.0.0-alpha.6

2 years ago

1.0.0-alpha.10

2 years ago

1.0.0-alpha.5

2 years ago

1.0.0-alpha.16

2 years ago

1.0.0-alpha.15

2 years ago

1.0.0-alpha.18

2 years ago

1.0.0-alpha.17

2 years ago

1.0.0-alpha.12

2 years ago

1.0.0-alpha.11

2 years ago

1.0.0-alpha.14

2 years ago

1.0.0-alpha.13

2 years ago

1.0.0-alpha.4

2 years ago

1.0.0-alpha.3

2 years ago

1.0.0-alpha.2

2 years ago

1.0.0-alpha.1

2 years ago

1.0.0-alpha.0

2 years ago