Skip to content

Commit

Permalink
docs: 문서 개선
Browse files Browse the repository at this point in the history
  • Loading branch information
nonameP765 committed Aug 19, 2024
1 parent f311d00 commit d69e436
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 19 deletions.
39 changes: 22 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

A simple typography plugin for Tailwind CSS.

<img src="./doc/img/usage.gif">

You can set up `fontFamily`, `fontWeight`, `fontSize`, and `lineHeight` easily and quickly.

## Installation
Expand All @@ -26,23 +28,23 @@ module.exports = {
...
plugins: [
...
require('./styles/plugins/typography.ts')({
fontFamilyMap: {
'SUIT-normal': {
weight: 400,
family: '"SUIT", sans-serif',
},
'SUIT-bold': {
weight: 700,
family: '"SUIT", sans-serif',
},
},
fontSizeList: [
80, 60, 40, 35, 30, 28, 25, 22, 20, 18, 15, 13, 12, 11, 10,
],
lineHeightList: [130, 160],
require('tailwind-simple-typography')({
fontFamilyMap: {
'pretendard-normal': {
weight: 400,
family: '"Pretendard", sans-serif',
},
'pretendard-bold': {
weight: 700,
family: '"Pretendard", sans-serif',
},
},
fontSizeList: [
80, 60, 40, 35, 30, 28, 25, 22, 20, 18, 15, 13, 12, 11, 10,
],
lineHeightList: [130, 160],
}),
]
],
}
```
Option interface:
Expand All @@ -68,10 +70,13 @@ interface TypographyOptions {

```jsx
<!-- React -->
<div className="Pretendard-normal-13-130">
<div className="pretendard-normal-13-130">
Hello, world!
</div>
```

## Authors
nonameP765 - [email protected]

## Code
[GitHub](https://github.com/nonameP765/tailwind-simple-typography)
Binary file added doc/img/usage.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ type FontSizeList = number[];
type LineHeightList = number[];

const defaultFontFamilyMap: FontFamilyMap = {
'Pretendard-normal': {
'pretendard-normal': {
weight: 400,
family: '"Pretendard", sans-serif',
},
'Pretendard-bold': {
'pretendard-bold': {
weight: 700,
family: '"Pretendard", sans-serif',
},
Expand Down

0 comments on commit d69e436

Please sign in to comment.