Skip to content

Commit

Permalink
feat(styles): renamed meta to toggleButtonMeta
Browse files Browse the repository at this point in the history
  • Loading branch information
veyaromain committed Nov 12, 2024
1 parent b0691d4 commit 33a6af7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { StoryObj } from '@storybook/web-components';
import meta from './togglebutton.stories';
import toggleButtonMeta from './togglebutton.stories';
import { html } from 'lit';

const { id, ...metaWithoutId } = meta;
const { id, ...metaWithoutId } = toggleButtonMeta;

export default {
...metaWithoutId,
Expand All @@ -27,7 +27,7 @@ export const ToggleButton: Story = {
SIZES.map(size =>
TOGGLED.map(
isToggled => html`
${meta.render({
${toggleButtonMeta.render({
variant: btn,
size: size || 'null',
toggled: isToggled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface PostTogglebuttonProps {
contentWhenUntoggled?: string;
}

const meta: MetaComponent<PostTogglebuttonProps> = {
const toggleButtonMeta: MetaComponent<PostTogglebuttonProps> = {
id: '1a6f47c2-5e8a-45a0-b1c3-9f7e2b834c24',
title: 'Components/Toggle Button',
tags: ['package:WebComponents'],
Expand Down Expand Up @@ -69,30 +69,18 @@ const meta: MetaComponent<PostTogglebuttonProps> = {
},
},
variant: {
name: 'Variant',
...toggleButtonMeta.argTypes?.variant,
description:
'Defines a style variant.' +
'<span className="mt-8 alert alert-info alert-sm">' +
'For more options, please see the ' +
'<a href="/?path=/docs/eb78afcb-ce92-4990-94b6-6536d5ec6af4--docs">button documentation</a>' +
'.</span>',
control: {
type: 'inline-radio',
labels: {
'btn-primary': 'Primary',
'btn-secondary': 'Secondary',
'btn-tertiary': 'Tertiary',
},
},
options: ['btn-primary', 'btn-secondary', 'btn-tertiary'],
table: {
category: 'General',
},
},
},
};

export default meta;
export default toggleButtonMeta;

function renderBadge(args: Args) {
return html`
Expand Down

0 comments on commit 33a6af7

Please sign in to comment.