1.0.0 • Published 7 months ago
@internetarchive/ia-styles v1.0.0
ia-styles
This package contains shared styles for Internet Archive web components.
Installation
npm i @internetarchive/ia-stylesUsage
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 startTo 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 testTo run the tests in watch mode (for <abbr title="test driven development">TDD</abbr>, for example), run
npm run test:watchLinting with ESLint, Prettier, and Types
To scan the project for linting errors, run
npm run lintYou can lint with ESLint and Prettier individually as well
npm run lint:eslintnpm run lint:prettierTo automatically fix many linting errors, run
npm run formatYou can format using ESLint and Prettier individually as well
npm run format:eslintnpm run format:prettier1.0.0
7 months ago
0.0.1-alpha1
2 years ago