From 52fc4bc0b2084b09133de4448ae73c2315ff77b3 Mon Sep 17 00:00:00 2001
From: JesmoDev <26099018+JesmoDev@users.noreply.github.com>
Date: Tue, 20 Aug 2024 10:10:22 +0200
Subject: [PATCH] button story
---
packages/uui-button/lib/uui-button.stories.ts | 66 ++++++++++++++++++-
1 file changed, 65 insertions(+), 1 deletion(-)
diff --git a/packages/uui-button/lib/uui-button.stories.ts b/packages/uui-button/lib/uui-button.stories.ts
index dd62a265d..65f024e3f 100644
--- a/packages/uui-button/lib/uui-button.stories.ts
+++ b/packages/uui-button/lib/uui-button.stories.ts
@@ -129,7 +129,7 @@ export const Sizing: Story = {
render: args => {
return html``;
+ ${spread(args, cssProps, ['font-size'])}>`;
},
};
@@ -138,3 +138,67 @@ export const Loading: Story = {
state: 'waiting',
},
};
+
+export const ContentAlign: Story = {
+ args: {
+ '--uui-button-content-align': 'left',
+ },
+ render: args => {
+ return html``;
+ },
+};
+
+export const SlottedContent: Story = {
+ render: args => {
+ return html`
+
+
+
+
+ Settings
+
+
+
+ `;
+ },
+};
+
+export const LooksAndColors: Story = {
+ render: args => {
+ const looks = [
+ 'default',
+ 'primary',
+ 'secondary',
+ 'outline',
+ 'placeholder',
+ ] as const;
+ const colors = ['default', 'positive', 'warning', 'danger'] as const;
+
+ const uppercaseFirstLetter = (str: string) =>
+ str.charAt(0).toUpperCase() + str.slice(1);
+
+ return html`
+
Looks and colors
+ ${colors.map(
+ color => html`
+ ${uppercaseFirstLetter(color)}
+ ${looks.map(
+ look =>
+ html` `,
+ )}
+
+ `,
+ )}
+ `;
+ },
+ parameters: {
+ controls: { exclude: ['label', 'look', 'color'] },
+ },
+};