1.0.0 • Published 7 months ago

@internetarchive/ia-styles v1.0.0

Weekly downloads
-
License
AGPL-3.0-only
Repository
-
Last release
7 months ago

Build Status codecov

ia-styles

This package contains shared styles for Internet Archive web components.

Installation

npm i @internetarchive/ia-styles

Usage

import { iaButtonStyles, iaSronlyStyles } from '@internetarchive/ia-styles';

// Example usage in a LitElement component
import { LitElement, html, css } from 'lit';
import { iaButtonStyles } from '@internetarchive/ia-styles';

class MyComponent extends LitElement {
  static styles = [
    iaButtonStyles,
    css`
      /* Additional styles here */
    `
  ];

  render() {
    return html`
      <button class="ia-button primary">Click me</button>
    `;
  }
}

customElements.define('my-component', MyComponent);

Available Styles

iaButtonStyles

Styles for buttons.

iaSronlyStyles

Styles for screen reader only elements.

Local Demo with web-dev-server

npm run start

To run a local development server that serves the basic demo located in demo/index.html

Testing with Web Test Runner

To run the suite of Web Test Runner tests, run

npm run test

To run the tests in watch mode (for <abbr title="test driven development">TDD</abbr>, for example), run

npm run test:watch

Linting with ESLint, Prettier, and Types

To scan the project for linting errors, run

npm run lint

You can lint with ESLint and Prettier individually as well

npm run lint:eslint
npm run lint:prettier

To automatically fix many linting errors, run

npm run format

You can format using ESLint and Prettier individually as well

npm run format:eslint
npm run format:prettier
1.0.0

7 months ago

0.0.1-alpha1

2 years ago