-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #180 from Dias999/feature/Storybook-Link
feat: storybook / TSDocs - Link
- Loading branch information
Showing
6 changed files
with
93 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { default } from './Link'; | ||
export { Link, LinkProps } from './Link'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { Link } from '@concepta/react-material-ui'; | ||
|
||
const meta: Meta<typeof Link> = { | ||
component: Link, | ||
tags: ['autodocs'], | ||
args: { | ||
children: 'This is a Link', | ||
href: '#', | ||
}, | ||
argTypes: { | ||
color: { control: 'color' }, | ||
sx: { control: 'object' }, | ||
component: { control: 'text' }, | ||
}, | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Default: Story = { | ||
args: {}, | ||
}; | ||
|
||
export const CustomColorLink: Story = { | ||
args: { | ||
color: 'secondary.main', | ||
}, | ||
}; | ||
|
||
export const CustomStyles: Story = { | ||
args: { | ||
sx: { | ||
fontSize: '20px', | ||
padding: '10px', | ||
backgroundColor: 'lightgray', | ||
borderRadius: '4px', | ||
}, | ||
}, | ||
}; | ||
|
||
export const LinkWithUnderline: Story = { | ||
args: { | ||
sx: { | ||
textDecoration: 'underline', | ||
}, | ||
}, | ||
}; | ||
|
||
export const VariantH2: Story = { | ||
args: { | ||
variant: 'h2', | ||
}, | ||
}; | ||
|
||
export const LinkAsButton: Story = { | ||
args: { | ||
component: 'button', | ||
sx: { | ||
padding: '10px 20px', | ||
backgroundColor: 'primary.main', | ||
color: 'white', | ||
borderRadius: '5px', | ||
border: 'none', | ||
cursor: 'pointer', | ||
}, | ||
}, | ||
}; |