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

Tietokilta/ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

fc4679f · Jul 22, 2023

History

25 Commits
Jun 5, 2023
Apr 12, 2023
Jul 22, 2023
Apr 12, 2023
Jul 22, 2023
Jun 5, 2023
Jun 5, 2023
Jun 5, 2023
Apr 13, 2023
Jun 5, 2023
Jul 22, 2023
Apr 13, 2023
Apr 12, 2023
Apr 12, 2023
Jul 22, 2023
Jul 22, 2023
Apr 12, 2023
Jul 22, 2023
Jun 5, 2023
Apr 12, 2023
Jun 5, 2023

Repository files navigation

@tietokilta/ui

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

Getting Started

  1. Install @tietokilta/ui dependency (Note: not yet published to package managers!)
pnpm install @tietokilta/ui # or npm/yarn
  1. Add template path to tailwind.config.cjs file:
/** @type {import('tailwindcss').Config} */
module.exports = {
  content: ["./node_modules/@tietokilta/ui/**/*.{js,cjs}"]
  // ...
};
  1. Import components
import { Button } from "@tietokilta/ui";

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

Developing TiKUI

Recommended VSCode settings:

{
  "editor.tabSize": 2,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnSave": true,
  "tailwindCSS.experimental.classRegex": [["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]]
}
# install dependencies
pnpm install

# launch storybook w/ HMR
pnpm dev

# format style
pnpm format

# lint
pnpm lint

# run tests
pnpm test