Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

docs: add introduction page to storybook #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .storybook/main.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
stories: ["../lib/**/*.stories.@(js|jsx|ts|tsx)"],
stories: ["../lib/**/*.mdx", "../lib/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# @tietokilta/ui

Component library built in Tietokilta style, for use in React apps w/ tailwindcss
Component library built in Tietokilta style, for use in React apps with TailwindCSS

Design system [Figma](https://www.figma.com/file/eMVyR3hefnb9WvmZEkvgUf/TikUI?type=design&node-id=0-1), Documentation [Storybook](https://tietokilta.github.io/ui)

## Getting Started

Expand Down
41 changes: 41 additions & 0 deletions lib/components/Introduction.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import { Meta } from "@storybook/blocks";

<Meta title="Introduction" />

# @tietokilta/ui

Component library built in Tietokilta style, for use in React apps with TailwindCSS

Design system [Figma](https://www.figma.com/file/eMVyR3hefnb9WvmZEkvgUf/TikUI?type=design&node-id=0-1), Source [GitHub](https://github.com/tietokilta/ui)

## Installation

1. Install @tietokilta/ui dependency (**Note:** not yet published to package managers!)

```bash
pnpm install @tietokilta/ui # or npm/yarn
```

2. Add template path to `tailwind.config.cjs` file:

```js
/** @type {import('tailwindcss').Config} */
module.exports = {
content: ["./node_modules/@tietokilta/ui/**/*.{js,cjs}"]
// ...
};
```

## Usage

```tsx
import { Button } from "@tietokilta/ui";

const App = () => (
<div>
<Button action="primary" destructive>
Tietokilta!
</Button>
</div>
);
```
Loading