-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea67ccf
commit b9474a2
Showing
4 changed files
with
14 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,16 @@ | ||
# ENS Design System · [![NPM version](https://img.shields.io/npm/v/thorin.svg?style=for-the-badge&labelColor=161c22)](https://www.npmjs.com/package/@ensdomains/thorin) [![License](https://img.shields.io/npm/l/thorin.svg?style=for-the-badge&labelColor=161c22)](/LICENSE) | ||
# ENS Design System | ||
|
||
A design system for ENS built with React and styled-components. | ||
[![NPM version](https://img.shields.io/npm/v/thorin.svg?style=for-the-badge&labelColor=161c22)](https://www.npmjs.com/package/@ensdomains/thorin) [![License](https://img.shields.io/npm/l/thorin.svg?style=for-the-badge&labelColor=161c22)](/LICENSE) | ||
|
||
A design system for ENS built with React and vanilla-extract. | ||
|
||
**NOTE: This project is in alpha stage. It is in active development and is subject to change.** | ||
|
||
## Install | ||
|
||
To install this package using npm: | ||
|
||
```bash | ||
npm install @ensdomains/thorin styled-components [email protected] | ||
|
||
``` | ||
|
||
To install this package using yarn: | ||
|
||
```bash | ||
yarn add @ensdomains/thorin styled-components [email protected] | ||
``` | ||
|
||
## Set Up | ||
|
||
In your App component, wrap the root of your app in a [`ThemeProvider`](https://styled-components.com/docs/advanced) module from [styled-components](https://styled-components.com). Import `ThorinGlobalStyles` and declare it as a child of `ThemeProvider` to set global styles. Set the theme by passing a theme object to `ThemeProvider`. | ||
|
||
```tsx | ||
import { ThemeProvider } from 'styled-components' | ||
import { ThorinGlobalStyles, lightTheme } from '@ensdomains/thorin' | ||
|
||
const App = () => { | ||
return ( | ||
<ThemeProvider theme={lightTheme}> | ||
<ThorinGlobalStyles /> | ||
{children} | ||
</ThemeProvider> | ||
) | ||
} | ||
``` | ||
|
||
### Dark Theme | ||
|
||
To use the dark theme, import darkTheme and pass it to the ThemeProvider | ||
|
||
```tsx | ||
import { ThemeProvider } from 'styled-components' | ||
import { ThorinGlobalStyles, lightTheme } from '@ensdomains/thorin' | ||
|
||
const App = () => { | ||
return ( | ||
<ThemeProvider theme={lightTheme}> | ||
<ThorinGlobalStyles /> | ||
{children} | ||
</ThemeProvider> | ||
) | ||
} | ||
``` | ||
|
||
## Use Components | ||
|
||
A list of components with examples are available on the [project website](https://thorin.ens.domains). | ||
|
||
A simple example to get you started: | ||
|
||
```tsx | ||
import { Input, SearchSVG } from '@ensdomains/thorin' | ||
|
||
const SearchInput = () => { | ||
return ( | ||
<Input | ||
label="Search" | ||
placeholder="Name or wallet address" | ||
prefix={<SearchSVG />} | ||
/> | ||
) | ||
} | ||
pnpm i react react-dom @ensdomains/thorin | ||
``` | ||
|
||
## Documentation | ||
|
@@ -88,21 +26,21 @@ The documentation is divided into two sections. | |
|
||
```bash | ||
gh clone repo @ensdomains/thorin | ||
pnpm install | ||
pnpm i | ||
pnpm dev | ||
``` | ||
|
||
Before development, it is recommended that you read the following: | ||
|
||
- [Development Guide](https://thorin.ens.domains/guides/development) - Information and tips to help you when working on this project including: | ||
- [Component Groups](https://thorin.ens.domains/guides/development#component-groups) - How the components are organized. | ||
- [Adding Components](https://thorin.ens.domains/guides/development#adding-components) - A list of files that need to be added or modified for each component. | ||
- [Style Guidlines](https://thorin.ens.domains/guides/development#style-guidelines) - Rules and tips to follow to keep the project code consistent and maintainable. | ||
- [Common Issues](https://thorin.ens.domains/guides/development#common-issues) - A list of known issues and how to resolve them. | ||
- [Component Groups](https://thorin.ens.domains/guides/development#component-groups) - How the components are organized. | ||
- [Adding Components](https://thorin.ens.domains/guides/development#adding-components) - A list of files that need to be added or modified for each component. | ||
- [Style Guidlines](https://thorin.ens.domains/guides/development#style-guidelines) - Rules and tips to follow to keep the project code consistent and maintainable. | ||
- [Common Issues](https://thorin.ens.domains/guides/development#common-issues) - A list of known issues and how to resolve them. | ||
|
||
## Contributing | ||
|
||
Contribute to this project by sending a pull request to [this repository](https://github.com/ensdomains/thorin). | ||
Contribute to this project by sending a pull request. | ||
|
||
## Sources | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters