This repository has been archived by the owner on Oct 4, 2022. It is now read-only.
forked from tabrez96/cogo-toast
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Migrating to TypeScript * PNPM Setup * PNPM Config * TypeScript Types * PNPM Config for Docs * Docs dev * TypeScript * TS Changes * TypeScript Errors, Move to Beta
- Loading branch information
Anmol Mahatpurkar
authored
Jan 8, 2020
1 parent
7faa2b8
commit 625aac7
Showing
63 changed files
with
19,776 additions
and
18,319 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,33 +1,45 @@ | ||
{ | ||
"parser": "babel-eslint", | ||
"plugins": ["react", "jsx-a11y", "import", "react-hooks"], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 2018, | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint", "react", "jsx-a11y", "import", "react-hooks"], | ||
"extends": ["airbnb", "plugin:prettier/recommended", "prettier/react", "prettier/standard"], | ||
"env": { "browser": true }, | ||
"rules": { | ||
"@typescript-eslint/indent": ["warn", "tab", { "SwitchCase": 1 }], | ||
"@typescript-eslint/no-explicit-any": "off", | ||
"indent": ["warn", "tab", { "SwitchCase": 1 }], | ||
"class-methods-use-this": "off", | ||
"prettier/prettier": "error", | ||
"no-underscore-dangle": "off", | ||
"no-cond-assign": "off", | ||
"no-plusplus": "off", | ||
"no-tabs": "off", | ||
"no-unused-vars": "off", | ||
"eqeqeq": "warn", | ||
"camelcase": "off", | ||
"import/extensions": "off", | ||
"import/no-extraneous-dependencies": "off", | ||
"import/prefer-default-export": "off", | ||
"react/destructuring-assignment": "off", | ||
"react/jsx-props-no-spreading": "off", | ||
"react/jsx-indent": ["error", "tab"], | ||
"react/jsx-indent-props": ["error", "tab"], | ||
"react/no-array-index-key": "warn", | ||
"react/jsx-one-expression-per-line": "off", | ||
"react/jsx-filename-extension": [1, { "extensions": [".jsx"] }], | ||
"react/jsx-filename-extension": [1, { "extensions": [".jsx", ".tsx"] }], | ||
"react/static-property-placement": "off", | ||
"jsx-a11y/mouse-events-have-key-events": "off", | ||
"jsx-a11y/media-has-caption": "off", | ||
"jsx-a11y/anchor-is-valid": "off" | ||
}, | ||
"settings": { | ||
"import/extensions": [".js", ".jsx"], | ||
"import/extensions": [".js", ".jsx", ".ts", ".tsx", ".json"], | ||
"import/parsers": { "@typescript-eslint/parser": [".ts", ".tsx"] }, | ||
"import/resolver": { | ||
"node": { "extensions": [".js", ".jsx"] } | ||
"node": { "extensions": [".js", ".jsx", ".ts", ".tsx", ".json"] } | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -22,3 +22,5 @@ yarn-error.log* | |
|
||
docs/.next/ | ||
docs/out/ | ||
|
||
pnpm-debug.log |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import React, { useState } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import styled from '@emotion/styled'; | ||
|
||
import { H3 } from './Headers'; | ||
import CodeBlock from './CodeBlock'; | ||
import CodeIcon from './CodeIcon'; | ||
|
||
const CodePanel = ({ heading, code, children }) => { | ||
const [isOpen, setIsOpen] = useState(false); | ||
|
||
return ( | ||
<Container> | ||
<Row> | ||
<H3>{heading}</H3> | ||
{code && <CodeIcon onClick={() => setIsOpen((prev) => !prev)} />} | ||
</Row> | ||
{isOpen && <CodeParent>{code}</CodeParent>} | ||
{children} | ||
</Container> | ||
); | ||
}; | ||
|
||
const Container = styled.div` | ||
width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
padding: 30px 30px; | ||
`; | ||
|
||
const Row = styled.div` | ||
display: flex; | ||
align-items: center; | ||
`; | ||
|
||
const CodeParent = styled.div` | ||
margin: 20px 0px; | ||
display: flex; | ||
justify-content: center; | ||
`; | ||
|
||
CodePanel.Block = CodeBlock; | ||
|
||
CodePanel.propTypes = { | ||
heading: PropTypes.string.isRequired, | ||
children: PropTypes.node.isRequired, | ||
code: PropTypes.node, | ||
}; | ||
|
||
CodePanel.defaultProps = { | ||
code: '', | ||
}; | ||
|
||
export default CodePanel; |
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
File renamed without changes.
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
4 changes: 3 additions & 1 deletion
4
docs/common-util/paragraph/index.jsx → docs/common/Paragraph.tsx
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,9 +1,11 @@ | ||
import styled from '@emotion/styled'; | ||
|
||
export default styled.p` | ||
const Paragraph = styled.p` | ||
color: #404040; | ||
margin: 2px 0px; | ||
padding: 0px; | ||
font-size: 14px; | ||
text-align: center; | ||
`; | ||
|
||
export default Paragraph; |
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
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from 'react'; | ||
import styled from '@emotion/styled'; | ||
|
||
import CodePanel from '../../common/CodePanel'; | ||
|
||
const AllOptions = () => ( | ||
<CodePanel heading="All Options for Customization"> | ||
<Section>Table</Section> | ||
</CodePanel> | ||
); | ||
|
||
const Section = styled.section` | ||
display: flex; | ||
justify-content: center; | ||
flex-wrap: wrap; | ||
margin-top: 20px; | ||
& > * { | ||
margin: 10px 15px; | ||
width: 150px; | ||
} | ||
`; | ||
|
||
export default AllOptions; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.