-
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.
feat: implement for TextLink component
- Loading branch information
1 parent
529927f
commit 34f1a1b
Showing
6 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
frontend/apps/service-site/src/features/posts/components/LinkText/LinkText.module.css
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,13 @@ | ||
.link { | ||
color: var(--primary-color); | ||
|
||
&:hover { | ||
background-image: linear-gradient( | ||
var(--primary-color), | ||
var(--primary-color) | ||
); | ||
background-size: 100% 1px; | ||
background-position: 0 100%; | ||
background-repeat: no-repeat; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
frontend/apps/service-site/src/features/posts/components/LinkText/LinkText.stories.tsx
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,16 @@ | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
|
||
import { LinkText } from '.' | ||
|
||
const StoryComponent = () => { | ||
return <LinkText href="https://www.google.com">dummy</LinkText> | ||
} | ||
|
||
const meta = { | ||
component: StoryComponent, | ||
} satisfies Meta<typeof StoryComponent> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof meta> | ||
|
||
export const Default: Story = {} |
14 changes: 14 additions & 0 deletions
14
frontend/apps/service-site/src/features/posts/components/LinkText/LinkText.tsx
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,14 @@ | ||
import type { PropsWithChildren } from 'react' | ||
import styles from './LinkText.module.css' | ||
|
||
type Props = PropsWithChildren & { | ||
href: string | ||
} | ||
|
||
export const LinkText = ({ children, ...props }: Props) => { | ||
return ( | ||
<a {...props} className={styles.link} href={props.href}> | ||
{children} | ||
</a> | ||
) | ||
} |
1 change: 1 addition & 0 deletions
1
frontend/apps/service-site/src/features/posts/components/LinkText/index.ts
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 @@ | ||
export * from './LinkText' |
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