0.0.1-next-e982b54 • Published 30 days ago

@cerberus-design/icons v0.0.1-next-e982b54

Weekly downloads
-
License
ISC
Repository
-
Last release
30 days ago

Icons

This is the official icon library for the Cerberus design system for React.

Installation

pnpm add @cerberus-design/icons

Usage

import { Add } from '@cerberus-design/icons';
import { IconButton, createIconButtonProps } from '@cerberus-design/react';

// An optional helper to manage a11y for the IconButton
const iconBtnProps = createIconButtonProps({
  label: 'Add to order',
  palette: 'neutral',
  size: 'lg',
});

function App() {
  return (
    <IconButton {...iconBtnProps.btn}>
      <Add {...iconBtnProps.icon} />
    </IconButton>
  );
};

Usage without the React library

import { Add } from '@cerberus-design/icons';
import { iconButton } from '@/styled-system/recipes';

function App() {
  return (
    <button aria-label="Add to order" className={iconButton()}>
      <Add aria-hidden />
    </button>
  );
};

Copyright (c) 2024 Digital University, All Rights Reserved