-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat] 하단 내비게이션 TabBar : svgr cli 설정, 탭이 선택되면 icon 색 변화
- Loading branch information
Showing
10 changed files
with
252 additions
and
39 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { SVGProps } from 'react'; | ||
|
||
interface SvgFeedProps extends SVGProps<SVGSVGElement> { | ||
mainColor: string; | ||
subColor: string; | ||
} | ||
|
||
const SvgFeed = ({ mainColor, subColor, ...props }: SvgFeedProps) => ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width={24} | ||
height={24} | ||
fill="none" | ||
{...props} | ||
> | ||
<path | ||
fill={mainColor} | ||
d="M3 4v16a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2" | ||
/> | ||
<path | ||
stroke={subColor} | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
strokeWidth={1.25} | ||
d="M7 7h10M7 17.002h10M7 12h10" | ||
/> | ||
</svg> | ||
); | ||
export default SvgFeed; |
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,23 @@ | ||
import { SVGProps } from 'react'; | ||
|
||
interface SvgHomeProps extends SVGProps<SVGSVGElement> { | ||
mainColor: string; | ||
} | ||
|
||
const SvgHome = ({ mainColor, ...props }: SvgHomeProps) => ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width={24} | ||
height={24} | ||
fill="none" | ||
{...props} | ||
> | ||
<path | ||
fill={mainColor} | ||
stroke={mainColor} | ||
strokeWidth={1.25} | ||
d="m2.766 10.188 9-7.2a.375.375 0 0 1 .468 0l9 7.2c.09.071.141.179.141.293V21a.375.375 0 0 1-.375.375h-4.5a.375.375 0 0 1-.375-.375v-6c0-.898-.727-1.625-1.625-1.625h-5c-.897 0-1.625.727-1.625 1.625v6a.375.375 0 0 1-.375.375H3A.375.375 0 0 1 2.625 21V10.48c0-.113.052-.221.14-.292Z" | ||
/> | ||
</svg> | ||
); | ||
export default SvgHome; |
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,25 @@ | ||
import { SVGProps } from 'react'; | ||
|
||
interface SvgMessageProps extends SVGProps<SVGSVGElement> { | ||
mainColor: string; | ||
subColor: string; | ||
} | ||
|
||
const SvgMessage = ({ mainColor, subColor, ...props }: SvgMessageProps) => ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width={24} | ||
height={24} | ||
fill="none" | ||
{...props} | ||
> | ||
<rect width={15} height={10} x={2} y={3.512} fill={subColor} rx={5} /> | ||
<path | ||
fill={mainColor} | ||
fillRule="evenodd" | ||
d="M7 14.512a5 5 0 0 1 5-5h5a5 5 0 0 1 3.484 8.587c.257.837.734 1.5 1.146 1.992.14.166.025.415-.19.395-1.209-.111-2.28-.571-3.157-1.14q-.617.165-1.283.166h-5a5 5 0 0 1-5-5m8.5 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0m3 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2m-7-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0" | ||
clipRule="evenodd" | ||
/> | ||
</svg> | ||
); | ||
export default SvgMessage; |
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,38 @@ | ||
import { SVGProps } from 'react'; | ||
|
||
interface SvgMypageProps extends SVGProps<SVGSVGElement> { | ||
mainColor: string; | ||
subColor: string; | ||
} | ||
|
||
const SvgMypage = ({ mainColor, subColor, ...props }: SvgMypageProps) => ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width={24} | ||
height={24} | ||
fill="none" | ||
{...props} | ||
> | ||
<path | ||
fill={subColor} | ||
d="m9.525 15.94.61-2.408 1.828-1.307 1.829 1.307.61 2.407a3.138 3.138 0 0 1-4.877 0" | ||
/> | ||
<path | ||
fill={mainColor} | ||
d="M7.063 9.216c-1.828-4.814 2.05-7.606 4.811-7.05 2.096-.462 3.566.024 4.818 1.634 1.25 1.61.61 4.212 0 5.416-2.06.076-2.519-1.14-3.01-1.806-1.444 2.408-5.222 2.175-6.619 1.806" | ||
/> | ||
<path | ||
fill={subColor} | ||
d="M11.978 14.705c-3.806 0-4.36-4.012-4.162-6.018 1.189.2 3.924.12 5.35-1.805.595.602 2.022 1.805 2.974 1.805.198 2.006-.357 6.018-4.162 6.018" | ||
/> | ||
<path | ||
fill={subColor} | ||
d="M7.154 9.107c.254-.096.527-.135.798-.113l.473 3.497a1.84 1.84 0 0 1-1.565-.154 1.82 1.82 0 0 1-.862-1.304 1.79 1.79 0 0 1 .485-1.483c.187-.195.416-.347.67-.443M16.847 9.107a1.8 1.8 0 0 0-.799-.113l-.473 3.497a1.84 1.84 0 0 0 1.565-.154 1.82 1.82 0 0 0 .862-1.304 1.79 1.79 0 0 0-.485-1.483 1.8 1.8 0 0 0-.67-.443" | ||
/> | ||
<path | ||
fill={mainColor} | ||
d="M4 18.85v1.636C4 21.322 4.672 22 5.5 22H12v-5.047c-1.367 0-2.102-.86-2.39-1.32a.27.27 0 0 0-.319-.118l-3.966 1.434A2.02 2.02 0 0 0 4 18.85M20 18.85v1.636c0 .836-.672 1.514-1.5 1.514H12v-5.047c1.367 0 2.102-.86 2.39-1.32a.27.27 0 0 1 .319-.118l3.966 1.434A2.02 2.02 0 0 1 20 18.85" | ||
/> | ||
</svg> | ||
); | ||
export default SvgMypage; |
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,29 @@ | ||
import { SVGProps } from 'react'; | ||
|
||
interface SvgNewPostProps extends SVGProps<SVGSVGElement> { | ||
mainColor: string; | ||
subColor: string; | ||
} | ||
|
||
const SvgNewPost = ({ mainColor, subColor, ...props }: SvgNewPostProps) => ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
width={24} | ||
height={24} | ||
fill="none" | ||
{...props} | ||
> | ||
<path | ||
fill={mainColor} | ||
d="M3 4v16a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2" | ||
/> | ||
<path | ||
stroke={subColor} | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
strokeWidth={1.25} | ||
d="M12 8v8M8 12h8" | ||
/> | ||
</svg> | ||
); | ||
export default SvgNewPost; |
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,5 @@ | ||
export { default as FeedIcon } from './Feed'; | ||
export { default as HomeIcon } from './Home'; | ||
export { default as MessageIcon } from './Message'; | ||
export { default as MypageIcon } from './Mypage'; | ||
export { default as NewPostIcon } from './NewPost'; |
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,16 @@ | ||
const template = (variables, { tpl }) => { | ||
return tpl` | ||
import React from 'react'; | ||
${variables.imports}; | ||
${variables.interfaces}; | ||
const ${variables.componentName} = (${variables.props}) => ( | ||
${variables.jsx} | ||
); | ||
${variables.exports}; | ||
`; | ||
}; | ||
|
||
module.exports = template; |