GithubHelp home page GithubHelp logo

isabella232 / fishtown-ui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dbt-labs/fishtown-ui

0.0 0.0 0.0 4 MB

The design implementation used at Fishtown Analytics.

Home Page: https://ui.fishtownanalytics.com/

License: Apache License 2.0

JavaScript 13.43% TypeScript 73.37% CSS 13.01% HTML 0.19%

fishtown-ui's Introduction

Fishtown UI ๐ŸŽจ๐Ÿ 

The design implementation used at Fishtown Analytics.

Built using Tailwind, TypeScript and React.

Install

Install the Fishtown UI theme and component library using npm when installing Tailwind and other plugins.

npm install --save tailwindcss autoprefixer fishtown-analytics/fishtown-ui

If you're looking to update to a new version in another repo, see Updating Fishtown UI node module.

Usage

Tailwind Theme

After installing Tailwind and Fishtown UI, follow the usage instructions for Tailwind.

Apply the Fishtown UI theme in your Tailwind configuration.

// Your project's tailwind.config.js
const fishtownUiTheme = require('fishtown-ui/theme');

// Example config with a custom color
module.exports = {
  ...fishtownUiTheme,
  // Customizations will overwrite the shallow-copy spread, so spread again where appropriate
  theme: {
    extend: {
      colors: {
        ...fishtownUiTheme.theme.extend.colors,
        'sextant-yellow': '#ffb600',
      },
    },
  },
};

We prefix all Tailwind classes with tw- to avoid conflicts with existing styles.

<nav class="tw-bg-orange tw-p-6">
  <div class="tw-text-white tw-mr-6">
    <span class="tw-font-semibold tw-text-xl tw-tracking-tight">
      Fishtown UI
    </span>
  </div>
</nav>

Component Library

We don't have ready-to-use components yet, but future usage will roughly look like the following.

We currently only export React components written in TypeScript.

import React from 'react';
import { Button } from 'fishtown-ui';

const logIn = () => {
  /* ... */
};

const LogInButton: React.FC = () => {
  return <Button onClick={logIn}>Log In</Button>;
};

export default LogInButton;

Updating Fishtown UI node module

If you are in a repo and having trouble updating from a tag to another:

  1. Make the update in package.json
  2. Make a similar manual update in package-lock.json (with the new tag number AND the new commit number)

Changing the from in package-lock.json specifies how you're naming this commit, while changing the version actually ensures you're targetting the correct commit.

Contributing

Read our contributing guide (in Storybook)

Roadmap

  • Define appropriate use of Storybook
  • Define default fonts and iconography
  • Define critical components
  • Determine if we should export CSS file(s) with compositions (@apply definitions)

License

Apache License, Version 2.0

fishtown-ui's People

Contributors

aaronraff avatar ashnm avatar davidharting avatar heysweet avatar jgiuffrida avatar jzfraser avatar naomiwritescode avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.