Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #245 from smartive-education/feature/textbox-update
Browse files Browse the repository at this point in the history
fix: remove unused stuff and fix story
  • Loading branch information
tomschall authored Mar 14, 2023
2 parents d94e928 + 07788d6 commit 09fb8b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,7 @@ export const TextBox: React.FC<ITextBoxProps> = ({
<form onSubmit={handleSubmit} tw="container">
<Card variant={variant}>
<UserWrapper variant={variant} mbSpacing="16">
{variant === 'write' && (
<User avatar={user.avatar} label={user.label} variant="write">
<IconLink
label={user.username}
type="username"
color="violet"
href={user.href}
legacyBehavior
passHref
linkComponent={Link}
/>
</User>
)}
{variant === 'write' && <User avatar={user.avatar} label={user.label} variant="write" />}
{variant === 'inline' && (
<User avatar={user.avatar} label={user.label} variant="inline">
<IconLink
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const Template: ComponentStory<typeof TextBox> = (args) => {
form={{
errorMessage: errorMessage,
placeholder: 'Hast du uns etwas mitzuteilen?',
name: 'Username',
}}
setInputValue={setInputValue}
inputValue={inputValue}
Expand Down Expand Up @@ -87,12 +88,8 @@ TextBoxStory.argTypes = {
},
defaultValue: {
label: 'Hey, was läuft?',
username: {
type: 'joined',
label: 'Username',
href: '#',
fCallBack: action('user clicked'),
},
username: 'Username',
href: '/',
avatar: {
src: 'https://media.giphy.com/media/cfuL5gqFDreXxkWQ4o/giphy.gif',
alt: 'Family Guy goes Mumble',
Expand Down Expand Up @@ -125,7 +122,11 @@ TextBoxStory.args = {
startHeading: 'Hey, was läuft?',
startParagraph: 'Schreib deinen ersten Mumble, oder folge einem User.',
uploadCallback: action('uploadCallback'),
form: { errorMessage: 'Bitte füllen sie das Formular aus.' },
form: {
errorMessage: 'Bitte füllen sie das Formular aus.',
placeholder: 'Hast du uns etwas mitzuteilen?',
name: 'Username',
},
};

TextBoxStory.parameters = {
Expand Down

0 comments on commit 09fb8b8

Please sign in to comment.