Socket
Book a DemoInstallSign in
Socket

@getlit/ui

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@getlit/ui

There's no set rules of how we should organise & structure the components & stylesheets. These are just my ideas and what works for me atm., open to any suggestions and I just want this UI repo get filled with all internal project components.

latest
npmnpm
Version
0.0.4
Version published
Maintainers
2
Created
Source

What

There's no set rules of how we should organise & structure the components & stylesheets. These are just my ideas and what works for me atm., open to any suggestions and I just want this UI repo get filled with all internal project components.

UI Repo Folder Structure

We can categorise these UI components into

  • domain/project-specific
  • pure & unstyled (1 base class)
  • mixed & styled (mixed class, a bit less modular but sometimes you just want styled components to be used)

CSS

  • base.css: all CSS files must(well if you want) extend from this

    • utils.css: like tailwind.css, but striped down to most common usages (for me). Included in base.css eg.
    // className="ml-12"
    margin-left: 12px;
    
    // className="flex center-item justify-center" to center an item in a div
    display: flex;
    align-items: center
    justify-content: center;
    
    
  • theme.example.css: extends from base.css all styles then must include a theme prefix that will be added to the root div

    eg.

    // app.tsx
    <div className="app" data-lit-theme="purple"></div>
    
    // thene.purple.css
    [data-lit-theme="purple"] button {
        // big and round ;)
    }
    
    

FAQs

Package last updated on 02 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts