@washingtonpost/wpds-icon
TypeScript icon, indicating that this package has built-in type declarations

1.24.0 • Public • Published

Icon

import { Icon } from "@washingtonpost/wpds-ui-kit";
import { Garlic } from "@washingtonpost/wpds-assets";

function Component() {
  return (
    <Icon size="$100" label="garlic">
      <Garlic />
    </Icon>
  );
}

Component API

  • size (["16", "24", "32"]), width and height of our icons from the system
  • label, The accessibility label for the icon. This label will be visually hidden but read aloud by VoiceOver and other screenreaders to describe the icon.

Do's and Don'ts

  • fill color will be set on the SVG icon component. not this component
  • the svg icon component will be hidden from the a11y tree. it's presentational. The SVG's title node should be removed as well.

Readme

Keywords

none

Package Sidebar

Install

npm i @washingtonpost/wpds-icon

Weekly Downloads

7,784

Version

1.24.0

License

MIT

Unpacked Size

15 kB

Total Files

11

Last publish

Collaborators

  • tam.steph
  • wp-aberg
  • ebgranger
  • artmsilva