Skip to content

Commit

Permalink
remove options from placeholder and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mollpo committed Sep 15, 2023
1 parent 4447072 commit 9bc7faa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
20 changes: 6 additions & 14 deletions src/components/content/WithPlaceholder/WithPlacehoder.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,25 @@ import { Meta, StoryObj } from '@storybook/react'
import { WithPlaceholder } from './WithPlaceholder'

const children = {
options: ['null', 'undefined', 'empty', 'text'],
options: ['null', 'undefined', 'Empty text', 'ReactNode'],
mapping: {
'null': null,
'undefined': undefined,
null: null,
undefined: undefined,

Check failure on line 16 in src/components/content/WithPlaceholder/WithPlacehoder.stories.tsx

View workflow job for this annotation

GitHub Actions / checks

Expected property shorthand
'Empty text': '',
'ReactNode': 'John Doe',
ReactNode: 'John Doe',
},
control: { type: 'select' },
}

const placeholder = {
options: ['default', 'star', 'notFound'],
mapping: {
default: '-',
star: '*',
notFound: 'Not found',
},
}
const meta = {
title: 'Components/Content/WithPlaceHolder',
component: WithPlaceholder,
args: {
children: 'Content',
children: 'John Doe',
placeholder: '-',
},
argTypes: {
children,
placeholder,
},
parameters: {
docs: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/content/WithPlaceholder/WithPlaceholder.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ReactNode } from 'react'
import { PropsWithChildren, ReactNode } from 'react'

export type WithPlaceholderProps = PropsWithChildren<{
/**
Expand Down

0 comments on commit 9bc7faa

Please sign in to comment.