From d1d9a8b7b8153385e8a6b176b2da744517ecd2a1 Mon Sep 17 00:00:00 2001 From: joaojramia <joao@holistic.foundation> Date: Thu, 13 Feb 2025 11:35:05 +0100 Subject: [PATCH] chore(HoliBricks): extend storybook story for Button with scaleIcon and iconBefore props --- holi-bricks/components/button/Button.stories.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/holi-bricks/components/button/Button.stories.tsx b/holi-bricks/components/button/Button.stories.tsx index be81e8ffd6..e7e046a866 100644 --- a/holi-bricks/components/button/Button.stories.tsx +++ b/holi-bricks/components/button/Button.stories.tsx @@ -4,7 +4,7 @@ import type { Meta, StoryObj } from '@storybook/react' import { Button } from 'holi-bricks/components/button' import React from 'react' -import { Chat3 } from '@holi/icons/src/generated' +import { Chat3, Hearts } from '@holi/icons/src/generated' import { View } from 'react-native' const availableVariants = ['primary', 'secondary', 'danger'] as const @@ -19,6 +19,7 @@ const disabledProps = [ 'aria-disabled', 'tabIndex', 'icon', + 'iconBefore', 'onPress', 'loadingLabel', 'testID', @@ -46,6 +47,7 @@ export const Playground: Story = { label: { description: 'Button text', required: false }, variant: { control: 'select', options: availableVariants }, size: { control: 'select', options: availableSizes }, + scaleIcon: { control: 'number', description: 'Scale factor for icons' }, }, args: { label: 'Label', @@ -56,6 +58,7 @@ export const Playground: Story = { transparent: false, selected: false, inline: true, + scaleIcon: 1, }, render: function Render(args) { const [, updateArgs] = useArgs() @@ -111,6 +114,15 @@ export const ByState: Story = { <View style={{ margin: 6 }}> <Button label="with icon" icon={Chat3} /> </View> + <View style={{ margin: 6 }}> + <Button label="with icon before" iconBefore={Hearts} /> + </View> + <View style={{ margin: 6 }}> + <Button label="with both icons" icon={Chat3} iconBefore={Hearts} /> + </View> + <View style={{ margin: 6 }}> + <Button label="with scaled icons" icon={Chat3} iconBefore={Hearts} scaleIcon={1.5} /> + </View> <View style={{ margin: 6 }}> <Button label="transparent" transparent /> </View> -- GitLab