-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
LEGRELLE, Félix
committed
Dec 20, 2024
1 parent
3b26dbb
commit ddefd33
Showing
6 changed files
with
70 additions
and
188 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,60 +1,53 @@ | ||
import * as React from "react"; | ||
import * as React from 'react' | ||
|
||
import { Meta, Story } from "@storybook/react"; | ||
import Link from "./Link"; | ||
import { LinkProps } from "./LinkProps"; | ||
import { Divider } from "../divider"; | ||
import { Text } from "../text"; | ||
import { IconName } from "../icon"; | ||
import { Meta, Story } from '@storybook/react' | ||
import Link from './Link' | ||
import { LinkProps } from './LinkProps' | ||
import { Divider } from '../divider' | ||
import { Text } from '../text' | ||
|
||
export default { | ||
title: "Components/Link", | ||
title: 'Components/Link', | ||
component: Link, | ||
} as Meta; | ||
} as Meta | ||
|
||
export const Base: Story<LinkProps> = (args) => ( | ||
<> | ||
<Link {...args}> Mot de passe oublié ?</Link> | ||
<Divider /> | ||
<Text> | ||
Je suis dans un paragraphe et ceci est un{" "} | ||
<Link inline>lien standard</Link> tandis que ceci est un | ||
<Link inline> lien standard non souligné</Link>. ou bien | ||
<Link inline>celui-ci non souligné</Link>. | ||
Je suis dans un paragraphe et ceci est un <Link markup="span">lien standard</Link> | ||
</Text> | ||
</> | ||
); | ||
) | ||
|
||
export const DansUnParagraphe: Story<LinkProps> = (args) => ( | ||
<Text> | ||
Je suis dans un paragraphe et ceci est un{" "} | ||
<Link {...args}>lien standard</Link> inline. | ||
Je suis dans un paragraphe et ceci est un <Link {...args}>lien standard</Link> inline. | ||
</Text> | ||
); | ||
) | ||
DansUnParagraphe.args = { | ||
inline: true, | ||
}; | ||
markup: 'span', | ||
} | ||
|
||
export const LiensVersPageExterne: Story<LinkProps> = (args) => ( | ||
<Link {...args}>En savoir plus</Link> | ||
); | ||
export const LiensVersPageExterne: Story<LinkProps> = (args) => <Link {...args}>En savoir plus</Link> | ||
LiensVersPageExterne.args = { | ||
iconName: IconName.NEW_TABBED_PAGE, | ||
href: "_blank", | ||
}; | ||
blank: true, | ||
href: 'https://github.com/BouyguesTelecom/trilogy', | ||
} | ||
|
||
export const LienAutonome: Story<LinkProps> = (args) => ( | ||
<Link {...args}>Mot de passe oublié</Link> | ||
); | ||
export const LienAutonome: Story<LinkProps> = (args) => <Link {...args}>Mot de passe oublié</Link> | ||
LienAutonome.args = { | ||
href: "_blank", | ||
}; | ||
href: 'https://github.com/BouyguesTelecom/trilogy' | ||
|
||
blank: true, | ||
} | ||
|
||
export const Inverted: Story<LinkProps> = (args) => ( | ||
<div style={{ backgroundColor: "#25465f", padding: 10 }}> | ||
<div style={{ backgroundColor: '#25465f', padding: 10 }}> | ||
<Link {...args}> Mot de passe oublié ?</Link> | ||
</div> | ||
); | ||
) | ||
Inverted.args = { | ||
inverted: true, | ||
}; | ||
} |
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