-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e3f5fdf
commit ad69784
Showing
10 changed files
with
169 additions
and
0 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,13 @@ | ||
import React from 'react'; | ||
import './card-thumbnail.scss'; | ||
import user from '../../../assets/images/card-thumbnail.jpg'; | ||
|
||
export const Cardthumb = ({ }) => { | ||
const image = { | ||
src: user, | ||
alt: 'Image', | ||
} | ||
return ( | ||
<div className="card_thumbnail__image"><img src={image.src} alt={image.alt} /> </div> | ||
); | ||
}; |
34 changes: 34 additions & 0 deletions
34
stories/Atom/Cards/Card-thumbnail/CardThumbnail.stories.mdx
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,34 @@ | ||
import { Meta, Story } from '@storybook/addon-docs'; | ||
import { Cardthumb } from './CardThumbnail'; | ||
|
||
<Meta title="Atoms/Cards/Card Thumbnail"/> | ||
|
||
<style>{` | ||
.subheading { | ||
font-weight: 700; | ||
font-size: 24px; | ||
color: #031c2d; | ||
line-height: 24px; | ||
margin-bottom: 12px; | ||
margin-top: 40px; | ||
} | ||
`}</style> | ||
|
||
# Card Thumbnail Component | ||
The Card Thumbnail Component is used to embed an image on a web page. | ||
|
||
<Story name="Card Thumbnail"> | ||
return <Cardthumb> </Cardthumb> ; | ||
</Story> | ||
|
||
<div className="subheading">Usage</div> | ||
|
||
<ul> | ||
<li>Take HTML from the HTML tab in the canvas</li> | ||
<u>To use SCSS include the following files in your implementation</u> | ||
<li>Include the common SCSS files like mixin <code>assets/scss</code></li> | ||
<li>Component SCSS file <code>card-thumbnail.scss</code></li> | ||
<u>To use CSS include the following files in your implementation</u> | ||
<li>The compiled CSS file from <code>assets/css/style.css</code></li> | ||
</ul> |
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,22 @@ | ||
@import "../../../assets/scss/mixins"; | ||
|
||
/* card_thumbnail__image start */ | ||
.card_thumbnail__image { | ||
position: relative; | ||
display: inline-flex; | ||
&::before { | ||
top: 0; | ||
left: 0; | ||
bottom: 0; | ||
content: ""; | ||
width: 100%; | ||
position: absolute; | ||
@extend %img-hover-effect; | ||
} | ||
&:hover{ | ||
&::before { | ||
opacity: 0.75; | ||
} | ||
} | ||
} | ||
/* card_thumbnail__image end */ |
13 changes: 13 additions & 0 deletions
13
stories/Atom/Cards/Publication-thumbnail/PublicationThumbnail.jsx
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 @@ | ||
import React from 'react'; | ||
import './publication-thumbnail.scss'; | ||
import user from '../../../assets/images/publication-thumbnail.jpg'; | ||
|
||
export const Publicationthumb = ({ }) => { | ||
const image = { | ||
src: user, | ||
alt: 'Image', | ||
} | ||
return ( | ||
<div className="publication_thumbnail__image"><img src={image.src} alt={image.alt} /></div> | ||
); | ||
}; |
39 changes: 39 additions & 0 deletions
39
stories/Atom/Cards/Publication-thumbnail/PublicationThumbnail.stories.mdx
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,39 @@ | ||
import { Meta, Story } from '@storybook/addon-docs'; | ||
import { Publicationthumb } from './PublicationThumbnail'; | ||
|
||
<Meta title="Atoms/Cards/Publication Thumbnail"/> | ||
|
||
<style>{` | ||
.subheading { | ||
font-weight: 700; | ||
font-size: 24px; | ||
color: #031c2d; | ||
line-height: 24px; | ||
margin-bottom: 12px; | ||
margin-top: 40px; | ||
} | ||
.usage { | ||
font-weight: 700; | ||
font-size: 15px; | ||
color: #3d3e3e; | ||
line-height: 24px; | ||
margin-bottom: 3px; | ||
} | ||
`}</style> | ||
|
||
# Publication Thumbnail | ||
The Publication Thumbnail Component is used to embed an image on a publication page. | ||
|
||
<Story name="Publication Thumbnail"> | ||
return <Publicationthumb> </Publicationthumb> ; | ||
</Story> | ||
|
||
<div className="subheading">Usage</div> | ||
<ul> | ||
<li>Take HTML from the HTML tab in the canvas</li> | ||
<u>To use SCSS include the following files in your implementation</u> | ||
<li>Include the common SCSS files like mixin <code>assets/scss</code></li> | ||
<li>Component SCSS file <code>publication-thumbnail.scss</code></li> | ||
<u>To use CSS include the following files in your implementation</u> | ||
<li>The compiled CSS file from <code>assets/css/style.css</code></li> | ||
</ul> |
40 changes: 40 additions & 0 deletions
40
stories/Atom/Cards/Publication-thumbnail/publication-thumbnail.scss
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,40 @@ | ||
@import "../../../assets/scss/mixins"; | ||
|
||
/* publication_thumbnail */ | ||
.publication_thumbnail__image { | ||
padding: 35px 47px; | ||
display: inline-flex; | ||
position: relative; | ||
z-index: 1; | ||
background: linear-gradient( 180deg,#c9d0d6 70%,#c9d0d6 0,#414648 70.5%,#9ea5ac 0,#9ea5ac); | ||
&::before { | ||
content: ""; | ||
left: 32px; | ||
z-index: -2; | ||
right: 20px; | ||
height: 27px; | ||
bottom: 37px; | ||
filter: blur(4px); | ||
border-radius: 21%; | ||
position: absolute; | ||
transform: skewX(64deg); | ||
background: #7b8085; | ||
width: calc(100% - 100px); | ||
} | ||
&::after { | ||
top: 0; | ||
left: 0; | ||
bottom: 0; | ||
content: ""; | ||
width: 100%; | ||
position: absolute; | ||
z-index: 99; | ||
@extend %img-hover-effect; | ||
} | ||
&:hover{ | ||
&::after { | ||
opacity: 0.75; | ||
} | ||
} | ||
} | ||
/* publication thumbnail end*/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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