Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
primogenial
/
wp-content
/
plugins
/
woocommerce
/
packages
/
woocommerce-blocks
/
assets
/
js
/
base
/
components
/
product-price
/
stories
:
index.tsx
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
/** * External dependencies */ import { Story, Meta } from '@storybook/react'; import { currencyControl } from '@woocommerce/storybook-controls'; /** * Internal dependencies */ import ProductPrice, { ProductPriceProps } from '..'; const ALLOWED_ALIGN_VALUES = [ 'left', 'center', 'right' ]; export default { title: 'WooCommerce Blocks/@base-components/ProductPrice', component: ProductPrice, argTypes: { align: { control: { type: 'radio' }, options: ALLOWED_ALIGN_VALUES, }, currency: currencyControl, }, args: { align: 'left', format: '<price/>', price: 3000, }, } as Meta< ProductPriceProps >; const Template: Story< ProductPriceProps > = ( args ) => ( <ProductPrice { ...args } /> ); export const Default = Template.bind( {} ); Default.args = {}; export const Sale = Template.bind( {} ); Sale.args = { regularPrice: 4500, }; export const Range = Template.bind( {} ); Range.args = { maxPrice: 5000, minPrice: 3000, };