import { html } from '@microsoft/fast-element';
import { type Meta, renderComponent, type StoryArgs, type StoryObj } from '../helpers.stories.js';
import { colorNeutralBackground6 } from '../theme/design-tokens.js';
import { getStorybookHelpers } from '../../.storybook/wc-toolkit-helpers.js';
import type { Text as FluentText } from './text.js';
import { TextAlign, TextFont, TextSize, TextWeight } from './text.options.js';
type Story = StoryObj;
const { argTypes } = getStorybookHelpers('fluent-text');
/**
* Used to generate slotted content for stories
* @param as - the element to generate
* @param content - the content for the element
* @returns ViewTemplate
*/
const generateSemanticElementTemplate = (as: string, content: string) => {
switch (as) {
case 'h1':
return html`
This text will not wrap lines when it overflows the container.
`),
};
export const Truncate: Story = {
render: renderComponent(html>`
Setting truncate and nowrap will truncate when it overflows the container.
`),
};
export const Italic: Story = {
render: renderComponent(html>`
Italics are emphasized text.
`),
};
export const Underline: Story = {
render: renderComponent(html>`
Underlined text draws the reader's attention to the words.
`),
};
export const Strikethrough: Story = {
render: renderComponent(html>`
Strikethrough text is used to indicate something that is no longer relevant.
`),
};
export const Block: Story = {
render: renderComponent(html>`
Fluent text is inline by default. Settingblockwill make it behave as a block element.
`),
};
export const Size: Story = {
render: renderComponent(html>`
1002003004005006007008009001000
`),
};
export const Weight: Story = {
render: renderComponent(html>`
This text is regular.This text is medium.This text is semibold.This text is bold.
`),
};
export const Align: Story = {
render: renderComponent(html>`
Start aligned block.End aligned block.Center aligned block.Justify aligned block text stretches wrapped lines to meet container edges.
`),
};
export const Font: Story = {
render: renderComponent(html>`