-
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.
- Loading branch information
1 parent
dce782e
commit f4ac535
Showing
4 changed files
with
65 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,22 @@ | ||
.Md a { | ||
color: inherit; | ||
text-decoration: underline; | ||
|
||
transition: color cubic-bezier(0.3, 0, 0.5, 1) 0.1s; | ||
|
||
cursor: pointer; | ||
} | ||
|
||
.Md a:hover { | ||
color: var(--blue-500); | ||
} | ||
|
||
.Md img { | ||
max-width: 100%; | ||
border-radius: var(--radius-m); | ||
cursor: pointer; | ||
} | ||
|
||
.Md p { | ||
hyphens: auto; | ||
} |
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 type { Meta, StoryFn } from '@storybook/react'; | ||
import React from 'react'; | ||
|
||
import { Card, CardContent } from '../Card/Card'; | ||
|
||
import { Md } from './Md'; | ||
|
||
const meta: Meta<typeof Md> = { | ||
title: '@harmony/Md', | ||
component: Md, | ||
}; | ||
|
||
export default meta; | ||
|
||
export const Default: StoryFn<typeof Md> = () => { | ||
return ( | ||
<div style={{ width: 500 }}> | ||
<Card> | ||
<CardContent view="transparent"> | ||
<Md> | ||
<a href="#">Link to some page</a> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aut impedit possimus fugit numquam | ||
reiciendis ratione at praesentium cumque, nisi ea quia delectus rem! Ipsa, id voluptates | ||
reprehenderit totam nemo eius sed commodi architecto labore impedit a in laborum explicabo | ||
autem, provident, minima exercitationem corrupti quasi sequi eveniet eaque iure unde. | ||
</p> | ||
<img src="https://www.dogeat.ru/img/%D0%9F%D0%BE%D1%87%D0%B5%D0%BC%D1%83%20%D0%BA%D0%BE%D1%82%20%D1%85%D1%80%D0%B8%D0%BF%D0%B8%D1%82%20%D0%B8%20%D1%82%D1%8F%D0%B6%D0%B5%D0%BB%D0%BE%20%D0%B4%D1%8B%D1%88%D0%B8%D1%82.jpg" /> | ||
</Md> | ||
</CardContent> | ||
</Card> | ||
</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,8 @@ | ||
import React, { FC, HTMLAttributes } from 'react'; | ||
import cn from 'classnames'; | ||
|
||
import s from './Md.module.css'; | ||
|
||
export const Md: FC<HTMLAttributes<HTMLDivElement>> = ({ className, ...props }) => ( | ||
<div className={cn(s.Md, className)} {...props}></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