refactor: iconProps control to constant
This commit is contained in:
@@ -33,3 +33,8 @@ export const whom: InputType = {
|
|||||||
description: 'Expense/income payer or payee',
|
description: 'Expense/income payer or payee',
|
||||||
table: {defaultValue: {detail: 'Defaults to none (empty string)', summary: '(empty string)'}},
|
table: {defaultValue: {detail: 'Defaults to none (empty string)', summary: '(empty string)'}},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const iconProps: InputType ={
|
||||||
|
control: 'object',
|
||||||
|
description: 'Properties for the rendered icon'
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { Meta, StoryObj } from '@storybook/angular';
|
import type { Meta, StoryObj } from '@storybook/angular';
|
||||||
import { ExpenseIncomeCategoryByAccountDetailComponent } from '../../lib/molecules/expense-income-category-by-account-detail/expense-income-category-by-account-detail.component';
|
import { ExpenseIncomeCategoryByAccountDetailComponent } from '../../lib/molecules/expense-income-category-by-account-detail/expense-income-category-by-account-detail.component';
|
||||||
import { amount, category, description, variant, whom } from '../control-constants/expense-income-detail';
|
import { amount, category, description, iconProps, variant, whom } from '../control-constants/expense-income-detail';
|
||||||
import { backgroundColor } from '../control-constants/circled-icon';
|
import { backgroundColor } from '../control-constants/circled-icon';
|
||||||
import { color, symbol } from '../control-constants/svg';
|
import { color, symbol } from '../control-constants/svg';
|
||||||
|
|
||||||
@@ -41,10 +41,7 @@ const meta: Meta<ExpenseIncomeCategoryByAccountDetailComponent> = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
description,
|
description,
|
||||||
iconProps: {
|
iconProps,
|
||||||
control: 'object',
|
|
||||||
description: 'Properties for the rendered icon'
|
|
||||||
},
|
|
||||||
showCheckbox: {
|
showCheckbox: {
|
||||||
control: 'boolean',
|
control: 'boolean',
|
||||||
description: 'Whether or not the element should show a checkbox',
|
description: 'Whether or not the element should show a checkbox',
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Meta, StoryObj } from "@storybook/angular";
|
import { Meta, StoryObj } from "@storybook/angular";
|
||||||
import { ExpenseIncomeCategoryDetailComponent } from "../../lib/molecules/expense-income-category-detail/expense-income-category-detail.component";
|
import { ExpenseIncomeCategoryDetailComponent } from "../../lib/molecules/expense-income-category-detail/expense-income-category-detail.component";
|
||||||
import { amount, category, description, variant, whom } from "../control-constants/expense-income-detail";
|
import { amount, category, description, iconProps, variant, whom } from "../control-constants/expense-income-detail";
|
||||||
import { backgroundColor } from "../control-constants/circled-icon";
|
import { backgroundColor } from "../control-constants/circled-icon";
|
||||||
import { color, symbol } from "../control-constants/svg";
|
import { color, symbol } from "../control-constants/svg";
|
||||||
|
|
||||||
@@ -10,13 +10,13 @@ const meta: Meta<ExpenseIncomeCategoryDetailComponent> = {
|
|||||||
tags: ['autodocs'],
|
tags: ['autodocs'],
|
||||||
args: {
|
args: {
|
||||||
amount: 9494,
|
amount: 9494,
|
||||||
|
category:"Ocio, recreación y snacks",
|
||||||
|
description:"Pizza",
|
||||||
iconProps:{
|
iconProps:{
|
||||||
backgroundColor: '#FFC3CD',
|
backgroundColor: '#FFC3CD',
|
||||||
color: '#ffffff',
|
color: '#ffffff',
|
||||||
symbol: 'riding-line'
|
symbol: 'riding-line'
|
||||||
},
|
},
|
||||||
category:"Ocio, recreación y snacks",
|
|
||||||
description:"Pizza",
|
|
||||||
variant:"expense",
|
variant:"expense",
|
||||||
whom:"Rappi",
|
whom:"Rappi",
|
||||||
/*iconProps*/
|
/*iconProps*/
|
||||||
@@ -28,10 +28,7 @@ const meta: Meta<ExpenseIncomeCategoryDetailComponent> = {
|
|||||||
amount,
|
amount,
|
||||||
category,
|
category,
|
||||||
description,
|
description,
|
||||||
iconProps: {
|
iconProps,
|
||||||
control: 'object',
|
|
||||||
description: 'Properties for the rendered icon'
|
|
||||||
},
|
|
||||||
variant,
|
variant,
|
||||||
whom,
|
whom,
|
||||||
/*icon props */
|
/*icon props */
|
||||||
|
|||||||
Reference in New Issue
Block a user