storybook: add story for args
This commit is contained in:
@@ -9,6 +9,13 @@ const meta: Meta<UmbLocalizeElement> = {
|
||||
args: {
|
||||
key: 'general_areyousure',
|
||||
},
|
||||
argTypes: {
|
||||
args: {
|
||||
control: {
|
||||
type: 'array',
|
||||
},
|
||||
},
|
||||
},
|
||||
decorators: [
|
||||
(story) => {
|
||||
return html`<div style="padding: 1rem; margin: 1rem; border: 1px solid green; max-width:50%;">
|
||||
@@ -31,6 +38,13 @@ type Story = StoryObj<UmbLocalizeElement>;
|
||||
|
||||
export const Overview: Story = {};
|
||||
|
||||
export const WithArguments: Story = {
|
||||
args: {
|
||||
key: 'blueprints_createdBlueprintMessage',
|
||||
args: ['About us'],
|
||||
},
|
||||
};
|
||||
|
||||
export const KeyNotFound: Story = {
|
||||
args: {
|
||||
key: 'general_ok_not_found',
|
||||
|
||||
@@ -17,9 +17,10 @@ export class UmbLocalizeElement extends UmbLitElement {
|
||||
key!: string;
|
||||
|
||||
/**
|
||||
* The comma-separated values to forward to the localization function.
|
||||
* The values to forward to the localization function (must be JSON compatible).
|
||||
* @attr
|
||||
* @example args="[1,2,3]"
|
||||
* @type {any[] | undefined}
|
||||
*/
|
||||
@property({
|
||||
type: Array,
|
||||
|
||||
Reference in New Issue
Block a user