mirror of
https://github.com/bitwarden/browser
synced 2026-02-18 10:23:52 +00:00
* adds aria-hidden to bit-icon when no aria-label provided * add ariaLabel to logo svg usages * add ariaLabel documentation * default ariaLable value to undefined * add logo label to translations * adds i18n pipe to component * Add binding to example docs
35 lines
834 B
TypeScript
35 lines
834 B
TypeScript
import { Meta, StoryObj } from "@storybook/angular";
|
|
|
|
import { BitIconComponent } from "./icon.component";
|
|
import * as GenericIcons from "./icons";
|
|
|
|
export default {
|
|
title: "Component Library/Icon",
|
|
component: BitIconComponent,
|
|
parameters: {
|
|
design: {
|
|
type: "figma",
|
|
url: "https://www.figma.com/design/Zt3YSeb6E6lebAffrNLa0h/Tailwind-Component-Library?node-id=21662-50335&t=k6OTDDPZOTtypRqo-11",
|
|
},
|
|
},
|
|
} as Meta;
|
|
|
|
type Story = StoryObj<BitIconComponent>;
|
|
|
|
export const Default: Story = {
|
|
args: {
|
|
icon: GenericIcons.NoAccess,
|
|
},
|
|
argTypes: {
|
|
icon: {
|
|
options: Object.keys(GenericIcons),
|
|
mapping: GenericIcons,
|
|
control: { type: "select" },
|
|
},
|
|
ariaLabel: {
|
|
control: "text",
|
|
description: "the text used by a screen reader to describe the icon",
|
|
},
|
|
},
|
|
};
|