File tree 5 files changed +83
-2
lines changed
src/components/molecules/Mailto
5 files changed +83
-2
lines changed Original file line number Diff line number Diff line change 138
138
"assets" : [
139
139
" package.json" ,
140
140
" package-lock.json" ,
141
- " CHANGELOG.md"
141
+ " CHANGELOG.md" ,
142
+ " src/scss/**/*.scss"
142
143
],
143
144
"message" : " chore(release): ${nextRelease.version} [skip ci]\n\n ${nextRelease.notes}"
144
145
}
147
148
"files" : [
148
149
" README.md" ,
149
150
" LICENSE" ,
150
- " dist"
151
+ " dist" ,
152
+ " src/scss"
151
153
],
152
154
"publishConfig" : {
153
155
"registry" : " https://npm.pkg.github.com" ,
Original file line number Diff line number Diff line change
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 number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change
1
+ export * from './Mailto'
You can’t perform that action at this time.
0 commit comments