generated from crazyfactory/ts-react-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from fossapps/6-create-component-card
chore(card): create component card
- Loading branch information
Showing
4 changed files
with
82 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import * as React from "react"; | ||
import { Card } from "./Card"; | ||
|
||
export default { | ||
component: Card, | ||
title: "Card" | ||
}; | ||
|
||
const card = { | ||
description: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the " + | ||
"industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled ", | ||
featureId: "Rohit", | ||
hypothesis: "Lorem Ipsum is simply dummy text of the printing and typesetting industry." | ||
}; | ||
|
||
export const CardView = () => { | ||
return <Card description={card.description} featureId={card.featureId} hypothesis={card.hypothesis}/>; | ||
}; |
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,20 @@ | ||
import * as React from "react"; | ||
|
||
export const ViewIcon: React.FC = () => { | ||
const style: React.CSSProperties = { | ||
fill: "#000", | ||
fillOpacity: 1, | ||
fillRule: "nonzero", | ||
stroke: "none" | ||
}; | ||
|
||
return( | ||
<div title={"flaticon from: (attribution) http://www.freepik.com/"}> | ||
{/* eslint-disable-next-line @typescript-eslint/tslint/config */} | ||
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 932.2 932.2"> | ||
<path d="M466.1 161.5c-205.6 0-382.8 121.2-464.2 296.1 -2.5 5.3-2.5 11.5 0 16.9 81.4 174.9 258.6 296.1 464.2 296.1s382.8-121.2 464.2-296.1c2.5-5.3 2.5-11.5 0-16.9C848.9 282.7 671.7 161.5 466.1 161.5zM466.1 676.2c-116.1 0-210.1-94.1-210.1-210.1 0-116.1 94.1-210.1 210.1-210.1 116.1 0 210.1 94.1 210.1 210.1S582.1 676.2 466.1 676.2z" style={style}/> | ||
<circle cx="466.1" cy="466" r="134.5" style={style}/> | ||
</svg> | ||
</div> | ||
); | ||
}; |
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 { Color } from "./Color"; | ||
|
||
const size = { | ||
L: 8, | ||
M: 6, | ||
S: 4, | ||
XS: 2 | ||
}; | ||
|
||
export type TBoxShadow = "XS" | "S" | "M" | "L"; | ||
|
||
export const boxShadow = (type: TBoxShadow) => { | ||
return `0 0 ${size[type]}px ${Color.GREY}`; | ||
}; |