Skip to content

Commit fc53aa2

Browse files
feat: migration of mailto
1 parent c844474 commit fc53aa2

File tree

5 files changed

+83
-2
lines changed

5 files changed

+83
-2
lines changed

package.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@
138138
"assets": [
139139
"package.json",
140140
"package-lock.json",
141-
"CHANGELOG.md"
141+
"CHANGELOG.md",
142+
"src/scss/**/*.scss"
142143
],
143144
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
144145
}
@@ -147,7 +148,8 @@
147148
"files": [
148149
"README.md",
149150
"LICENSE",
150-
"dist"
151+
"dist",
152+
"src/scss"
151153
],
152154
"publishConfig": {
153155
"registry": "https://npm.pkg.github.com",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from 'react'
2+
3+
import { ComponentStory, ComponentMeta } from '@storybook/react'
4+
5+
import { Mailto, MailtoProps } from './Mailto'
6+
7+
export default {
8+
title: 'molecules/Mailto',
9+
component: Mailto
10+
} as ComponentMeta<React.ComponentType<MailtoProps>>
11+
12+
const Template: ComponentStory<React.ComponentType<MailtoProps>> = args => <Mailto {...args} />
13+
14+
export const Primary = Template.bind({})
15+
Primary.args = {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
@import 'src/scss/mixins';
2+
3+
.mailto {
4+
@include flex-center;
5+
6+
margin: 15px 12px;
7+
8+
@include mobile {
9+
width: 100%;
10+
justify-content: left;
11+
padding-left: 8px;
12+
}
13+
}
14+
15+
.title {
16+
color: $color-light;
17+
font-weight: 500;
18+
}
19+
20+
.title,
21+
.label {
22+
font-size: 22px;
23+
line-height: 50px;
24+
}
25+
26+
.label {
27+
color: $color-base;
28+
padding-left: 10px;
29+
font-weight: 500;
30+
31+
&:hover {
32+
color: $color-light-gray;
33+
}
34+
}
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import React from 'react'
2+
3+
import { Link } from 'react-router-dom'
4+
5+
import css from './Mailto.styles.module.scss'
6+
7+
export type MailtoProps = {
8+
mailto: string
9+
label: string
10+
title: string
11+
}
12+
13+
export const Mailto = ({ mailto, label, title }: MailtoProps) => {
14+
return (
15+
<div className={css.mailto}>
16+
<p className={css.title}>{title}</p>
17+
<Link
18+
to="#"
19+
onClick={event => {
20+
window.location.href = mailto
21+
event.preventDefault()
22+
}}
23+
className={css.label}
24+
>
25+
{label}
26+
</Link>
27+
</div>
28+
)
29+
}
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './Mailto'

0 commit comments

Comments
 (0)