Skip to content

Commit a573f06

Browse files
committed
feat: initial commit
0 parents  commit a573f06

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+28953
-0
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_style = space
6+
indent_size = 2
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
build/
2+
dist/
3+
node_modules/
4+
.snapshots/
5+
*.min.js

.eslintrc

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"extends": [
4+
"standard",
5+
"standard-react",
6+
"plugin:prettier/recommended",
7+
"prettier/standard",
8+
"prettier/react",
9+
"plugin:@typescript-eslint/eslint-recommended"
10+
],
11+
"env": {
12+
"node": true
13+
},
14+
"parserOptions": {
15+
"ecmaVersion": 2020,
16+
"ecmaFeatures": {
17+
"legacyDecorators": true,
18+
"jsx": true
19+
}
20+
},
21+
"settings": {
22+
"react": {
23+
"version": "16"
24+
}
25+
},
26+
"rules": {
27+
"space-before-function-paren": 0,
28+
"react/prop-types": 0,
29+
"react/jsx-handler-names": 0,
30+
"react/jsx-fragments": 0,
31+
"react/no-unused-prop-types": 0,
32+
"import/export": 0
33+
}
34+
}

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# dependencies
2+
node_modules
3+
/.pnp
4+
.pnp.js
5+
6+
dist

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"printWidth": 80,
3+
"semi": false,
4+
"singleQuote": true,
5+
"trailingComma": "es5",
6+
"tabWidth": 2
7+
}

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
language: node_js
2+
node_js:
3+
- 12
4+
- 10

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# @solved-ac/ui-react
2+
3+
> React component library used by solved.ac
4+
5+
[![NPM](https://img.shields.io/npm/v/@solved-ac/ui-react.svg)](https://www.npmjs.com/package/@solved-ac/ui-react) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
6+
7+
## Install
8+
9+
```bash
10+
npm install --save @solved-ac/ui-react
11+
```
12+
13+
## Usage
14+
15+
```tsx
16+
import React, { Component } from 'react'
17+
18+
import MyComponent from '@solved-ac/ui-react'
19+
import '@solved-ac/ui-react/dist/index.css'
20+
21+
class Example extends Component {
22+
render() {
23+
return <MyComponent />
24+
}
25+
}
26+
```
27+
28+
## License
29+
30+
MIT © [shiftpsh](https://github.com/shiftpsh)

example/.storybook/main.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
3+
addons: [
4+
'@storybook/addon-links',
5+
'@storybook/addon-essentials',
6+
'@storybook/addon-interactions',
7+
'@storybook/preset-create-react-app',
8+
'storybook-addon-styled-component-theme/dist/preset'
9+
],
10+
framework: '@storybook/react'
11+
}

example/.storybook/preview-head.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<link rel="stylesheet" as="style" crossorigin href="https://cdn.jsdelivr.net/gh/orioncactus/pretendard/dist/web/static/pretendard.css" />

example/.storybook/preview.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { addDecorator } from '@storybook/react'
2+
import { withThemesProvider } from 'storybook-addon-styled-component-theme'
3+
import { ThemeProvider } from 'styled-components'
4+
import { Light, Dark } from '@solved-ac/ui-react'
5+
6+
export const parameters = {
7+
actions: { argTypesRegex: '^on[A-Z].*' },
8+
controls: {
9+
matchers: {
10+
color: /(background|color)$/i,
11+
date: /Date$/
12+
}
13+
}
14+
}
15+
16+
const themes = [Light, Dark]
17+
addDecorator(withThemesProvider(themes), ThemeProvider)

0 commit comments

Comments
 (0)