Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Olga Salnikova
custom-components-react-test
Commits
d575c561
Commit
d575c561
authored
2 months ago
by
Olga Salnikova
Browse files
Options
Download
Email Patches
Plain Diff
BigNameButton import path fix
parent
888ae966
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
dist/index.d.ts
+1
-1
dist/index.d.ts
dist/index.d.ts.map
+1
-1
dist/index.d.ts.map
dist/index.es.js.map
+1
-1
dist/index.es.js.map
dist/index.js.map
+1
-1
dist/index.js.map
dist/index.min.js.map
+1
-1
dist/index.min.js.map
src/index.tsx
+1
-1
src/index.tsx
with
6 additions
and
6 deletions
+6
-6
dist/index.d.ts
+
1
-
1
View file @
d575c561
import
BigNameButton
from
"
BigNameButton/BigNameButton
"
;
import
React
from
"
react
"
;
import
BigNameButton
from
"
./BigNameButton/BigNameButton
"
;
import
MyNestedCustomComponent
,
{
MyButtonProps
}
from
"
./my_nested_custom_component/my_nested_custom_component
"
;
/**
* Main Component Props
...
...
This diff is collapsed.
Click to expand it.
dist/index.d.ts.map
+
1
-
1
View file @
d575c561
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,6BAA6B,CAAC;AACxD,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,uBAAuB,EAAE,EAC9B,aAAa,EACd,MAAM,yDAAyD,CAAC;AAGjE;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AACD;;GAEG;AACH,iBAAS,QAAQ,CAAC,KAAK,EAAE,KAAK,qBAQ7B;AAED,QAAA,MAAM,iBAAiB,GAAI,OAAO;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,sBAYlE,CAAC;AAEF,OAAO,EACL,aAAa,EACb,QAAQ,EACR,aAAa,EACb,iBAAiB,EACjB,uBAAuB,GACxB,CAAC"}
\ No newline at end of file
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,aAAa,MAAM,+BAA+B,CAAC;AAC1D,OAAO,uBAAuB,EAAE,EAC9B,aAAa,EACd,MAAM,yDAAyD,CAAC;AAGjE;;GAEG;AACH,MAAM,WAAW,KAAK;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AACD;;GAEG;AACH,iBAAS,QAAQ,CAAC,KAAK,EAAE,KAAK,qBAQ7B;AAED,QAAA,MAAM,iBAAiB,GAAI,OAAO;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,sBAYlE,CAAC;AAEF,OAAO,EACL,aAAa,EACb,QAAQ,EACR,aAAa,EACb,iBAAiB,EACjB,uBAAuB,GACxB,CAAC"}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
dist/index.es.js.map
+
1
-
1
View file @
d575c561
{"version":3,"file":"index.es.js","sources":["../src/BigNameButton/BigNameButton.tsx","../src/my_nested_custom_component/my_nested_custom_component.tsx","../src/index.tsx","../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["import React from \"react\";\n\nconst BigNameButton = (props: { title: string; color: string }) => {\n return (\n <div\n style={{\n padding: \"20px\",\n backgroundColor: props.color,\n }}\n >\n {props.title}\n </div>\n );\n};\n\nexport default BigNameButton;\n","import React, { useState } from \"react\";\n\nexport interface MyButtonProps {\n title: string;\n size: number;\n}\n\nconst MyNestedCustomComponent = (props: {\n text?: string;\n color?: string;\n other: MyButtonProps;\n}) => {\n const [state, setState] = useState(0);\n\n return (\n <div>\n <button onClick={() => setState(state + 1)}>Press me</button>\n <span>{`Count is ${state}`}</span>\n </div>\n );\n};\n\nexport default MyNestedCustomComponent;\n","import BigNameButton from \"BigNameButton/BigNameButton\";\nimport React, { useEffect } from \"react\";\nimport MyNestedCustomComponent, {\n MyButtonProps,\n} from \"./my_nested_custom_component/my_nested_custom_component\";\nimport styles from \"./styles.module.css\";\n\n/**\n * Main Component Props\n */\nexport interface Props {\n message?: string;\n}\n/**\n * Main Component\n */\nfunction Greeting(props: Props) {\n useEffect(() => {\n console.log(\"Incoming message: \", props.message);\n }, [props.message]);\n\n return (\n <div className={styles.container}>{props.message ?? \"No Message\"}</div>\n );\n}\n\nconst MyCustomComponent = (props: { text?: string; color?: string }) => {\n return (\n <div\n style={{\n minHeight: \"100px\",\n minWidth: \"200px\",\n backgroundColor: `${props.color} 0.5`,\n }}\n >\n {props.text ?? \"No text here\"}\n </div>\n );\n};\n\nexport {\n BigNameButton,\n Greeting,\n MyButtonProps,\n MyCustomComponent,\n MyNestedCustomComponent,\n};\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":["BigNameButton","props","React","createElement","style","padding","backgroundColor","color","title","MyNestedCustomComponent","_a","useState","state","setState","onClick","Greeting","useEffect","console","log","message","className","styles","css","ref","insertAt","document","head","getElementsByTagName","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","MyCustomComponent","minHeight","minWidth","concat","text"],"mappings":"mDAEM,IAAAA,EAAgB,SAACC,GACrB,OACEC,EACEC,cAAA,MAAA,CAAAC,MAAO,CACLC,QAAS,OACTC,gBAAiBL,EAAMM,QAGxBN,EAAMO,MAGb,ECNMC,EAA0B,SAACR,GAKzB,IAAAS,EAAoBC,EAAS,GAA5BC,EAAKF,EAAA,GAAEG,EAAQH,EAAA,GAEtB,OACER,EAAAC,cAAA,MAAA,KACED,EAAAC,cAAA,SAAA,CAAQW,QAAS,WAAM,OAAAD,EAASD,EAAQ,EAAE,GAAmB,YAC7DV,EAAAC,cAAA,OAAA,KAAO,mBAAYS,IAGzB,yCCJA,SAASG,EAASd,SAKhB,OAJAe,GAAU,WACRC,QAAQC,IAAI,qBAAsBjB,EAAMkB,QAC1C,GAAG,CAAClB,EAAMkB,UAGRjB,EAAKC,cAAA,MAAA,CAAAiB,UAAWC,GAAgC,QAAbX,EAAAT,EAAMkB,eAAO,IAAAT,EAAAA,EAAI,aAExD,ECxBA,SAAqBY,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAE,GAC9B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DvB,EAAQqB,SAAStB,cAAc,SACnCC,EAAMwB,KAAO,WAEI,QAAbJ,GACEE,EAAKG,WACPH,EAAKI,aAAa1B,EAAOsB,EAAKG,YAKhCH,EAAKK,YAAY3B,GAGfA,EAAM4B,WACR5B,EAAM4B,WAAWC,QAAUX,EAE3BlB,EAAM2B,YAAYN,SAASS,eAAeZ,GAnBU,CAqBxD,8DDCM,IAAAa,EAAoB,SAAClC,SACzB,OACEC,EACEC,cAAA,MAAA,CAAAC,MAAO,CACLgC,UAAW,QACXC,SAAU,QACV/B,gBAAiB,GAAAgC,OAAGrC,EAAMM,MAAW,kBAGtCG,EAAAT,EAAMsC,oBAAQ,eAGrB","x_google_ignoreList":[3]}
\ No newline at end of file
{"version":3,"file":"index.es.js","sources":["../src/BigNameButton/BigNameButton.tsx","../src/my_nested_custom_component/my_nested_custom_component.tsx","../src/index.tsx","../node_modules/style-inject/dist/style-inject.es.js"],"sourcesContent":["import React from \"react\";\n\nconst BigNameButton = (props: { title: string; color: string }) => {\n return (\n <div\n style={{\n padding: \"20px\",\n backgroundColor: props.color,\n }}\n >\n {props.title}\n </div>\n );\n};\n\nexport default BigNameButton;\n","import React, { useState } from \"react\";\n\nexport interface MyButtonProps {\n title: string;\n size: number;\n}\n\nconst MyNestedCustomComponent = (props: {\n text?: string;\n color?: string;\n other: MyButtonProps;\n}) => {\n const [state, setState] = useState(0);\n\n return (\n <div>\n <button onClick={() => setState(state + 1)}>Press me</button>\n <span>{`Count is ${state}`}</span>\n </div>\n );\n};\n\nexport default MyNestedCustomComponent;\n","import React, { useEffect } from \"react\";\nimport BigNameButton from \"./BigNameButton/BigNameButton\";\nimport MyNestedCustomComponent, {\n MyButtonProps,\n} from \"./my_nested_custom_component/my_nested_custom_component\";\nimport styles from \"./styles.module.css\";\n\n/**\n * Main Component Props\n */\nexport interface Props {\n message?: string;\n}\n/**\n * Main Component\n */\nfunction Greeting(props: Props) {\n useEffect(() => {\n console.log(\"Incoming message: \", props.message);\n }, [props.message]);\n\n return (\n <div className={styles.container}>{props.message ?? \"No Message\"}</div>\n );\n}\n\nconst MyCustomComponent = (props: { text?: string; color?: string }) => {\n return (\n <div\n style={{\n minHeight: \"100px\",\n minWidth: \"200px\",\n backgroundColor: `${props.color} 0.5`,\n }}\n >\n {props.text ?? \"No text here\"}\n </div>\n );\n};\n\nexport {\n BigNameButton,\n Greeting,\n MyButtonProps,\n MyCustomComponent,\n MyNestedCustomComponent,\n};\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n"],"names":["BigNameButton","props","React","createElement","style","padding","backgroundColor","color","title","MyNestedCustomComponent","_a","useState","state","setState","onClick","Greeting","useEffect","console","log","message","className","styles","css","ref","insertAt","document","head","getElementsByTagName","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","MyCustomComponent","minHeight","minWidth","concat","text"],"mappings":"mDAEM,IAAAA,EAAgB,SAACC,GACrB,OACEC,EACEC,cAAA,MAAA,CAAAC,MAAO,CACLC,QAAS,OACTC,gBAAiBL,EAAMM,QAGxBN,EAAMO,MAGb,ECNMC,EAA0B,SAACR,GAKzB,IAAAS,EAAoBC,EAAS,GAA5BC,EAAKF,EAAA,GAAEG,EAAQH,EAAA,GAEtB,OACER,EAAAC,cAAA,MAAA,KACED,EAAAC,cAAA,SAAA,CAAQW,QAAS,WAAM,OAAAD,EAASD,EAAQ,EAAE,GAAmB,YAC7DV,EAAAC,cAAA,OAAA,KAAO,mBAAYS,IAGzB,yCCJA,SAASG,EAASd,SAKhB,OAJAe,GAAU,WACRC,QAAQC,IAAI,qBAAsBjB,EAAMkB,QAC1C,GAAG,CAAClB,EAAMkB,UAGRjB,EAAKC,cAAA,MAAA,CAAAiB,UAAWC,GAAgC,QAAbX,EAAAT,EAAMkB,eAAO,IAAAT,EAAAA,EAAI,aAExD,ECxBA,SAAqBY,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAE,GAC9B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DvB,EAAQqB,SAAStB,cAAc,SACnCC,EAAMwB,KAAO,WAEI,QAAbJ,GACEE,EAAKG,WACPH,EAAKI,aAAa1B,EAAOsB,EAAKG,YAKhCH,EAAKK,YAAY3B,GAGfA,EAAM4B,WACR5B,EAAM4B,WAAWC,QAAUX,EAE3BlB,EAAM2B,YAAYN,SAASS,eAAeZ,GAnBU,CAqBxD,8DDCM,IAAAa,EAAoB,SAAClC,SACzB,OACEC,EACEC,cAAA,MAAA,CAAAC,MAAO,CACLgC,UAAW,QACXC,SAAU,QACV/B,gBAAiB,GAAAgC,OAAGrC,EAAMM,MAAW,kBAGtCG,EAAAT,EAAMsC,oBAAQ,eAGrB","x_google_ignoreList":[3]}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
dist/index.js.map
+
1
-
1
View file @
d575c561
{"version":3,"file":"index.js","sources":["../src/BigNameButton/BigNameButton.tsx","../src/my_nested_custom_component/my_nested_custom_component.tsx","../node_modules/style-inject/dist/style-inject.es.js","../src/index.tsx"],"sourcesContent":["import React from \"react\";\n\nconst BigNameButton = (props: { title: string; color: string }) => {\n return (\n <div\n style={{\n padding: \"20px\",\n backgroundColor: props.color,\n }}\n >\n {props.title}\n </div>\n );\n};\n\nexport default BigNameButton;\n","import React, { useState } from \"react\";\n\nexport interface MyButtonProps {\n title: string;\n size: number;\n}\n\nconst MyNestedCustomComponent = (props: {\n text?: string;\n color?: string;\n other: MyButtonProps;\n}) => {\n const [state, setState] = useState(0);\n\n return (\n <div>\n <button onClick={() => setState(state + 1)}>Press me</button>\n <span>{`Count is ${state}`}</span>\n </div>\n );\n};\n\nexport default MyNestedCustomComponent;\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import BigNameButton from \"BigNameButton/BigNameButton\";\nimport React, { useEffect } from \"react\";\nimport MyNestedCustomComponent, {\n MyButtonProps,\n} from \"./my_nested_custom_component/my_nested_custom_component\";\nimport styles from \"./styles.module.css\";\n\n/**\n * Main Component Props\n */\nexport interface Props {\n message?: string;\n}\n/**\n * Main Component\n */\nfunction Greeting(props: Props) {\n useEffect(() => {\n console.log(\"Incoming message: \", props.message);\n }, [props.message]);\n\n return (\n <div className={styles.container}>{props.message ?? \"No Message\"}</div>\n );\n}\n\nconst MyCustomComponent = (props: { text?: string; color?: string }) => {\n return (\n <div\n style={{\n minHeight: \"100px\",\n minWidth: \"200px\",\n backgroundColor: `${props.color} 0.5`,\n }}\n >\n {props.text ?? \"No text here\"}\n </div>\n );\n};\n\nexport {\n BigNameButton,\n Greeting,\n MyButtonProps,\n MyCustomComponent,\n MyNestedCustomComponent,\n};\n"],"names":["useState","useEffect"],"mappings":";;;;AAEM,IAAA,aAAa,GAAG,UAAC,KAAuC,EAAA;IAC5D,QACE,KACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE;AACL,YAAA,OAAO,EAAE,MAAM;YACf,eAAe,EAAE,KAAK,CAAC,KAAK;AAC7B,SAAA,EAAA,EAEA,KAAK,CAAC,KAAK,CACR;AAEV;;ACNM,IAAA,uBAAuB,GAAG,UAAC,KAIhC,EAAA;IACO,IAAA,EAAA,GAAoBA,cAAQ,CAAC,CAAC,CAAC,EAA9B,KAAK,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,CAAA,CAAe;AAErC,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA;AACE,QAAA,KAAA,CAAA,aAAA,CAAA,QAAA,EAAA,EAAQ,OAAO,EAAE,YAAM,EAAA,OAAA,QAAQ,CAAC,KAAK,GAAG,CAAC,CAAC,CAAnB,EAAmB,EAAmB,EAAA,UAAA,CAAA;AAC7D,QAAA,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA,IAAA,EAAO,mBAAY,KAAK,CAAE,CAAQ,CAC9B;A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AAA,SAAS,EAAE,MAAM,CAAC,SAAS,EAAA,EAAG,CAAA,EAAA,GAAA,KAAK,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAI,YAAY,CAAO;AAE3E;AAEM,IAAA,iBAAiB,GAAG,UAAC,KAAwC,EAAA;;IACjE,QACE,KACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE;AACL,YAAA,SAAS,EAAE,OAAO;AAClB,YAAA,QAAQ,EAAE,OAAO;AACjB,YAAA,eAAe,EAAE,EAAA,CAAA,MAAA,CAAG,KAAK,CAAC,KAAK,EAAM,MAAA,CAAA;SACtC,EAEA,EAAA,CAAA,EAAA,GAAA,KAAK,CAAC,IAAI,mCAAI,cAAc,CACzB;AAEV;;;;;;;","x_google_ignoreList":[2]}
\ No newline at end of file
{"version":3,"file":"index.js","sources":["../src/BigNameButton/BigNameButton.tsx","../src/my_nested_custom_component/my_nested_custom_component.tsx","../node_modules/style-inject/dist/style-inject.es.js","../src/index.tsx"],"sourcesContent":["import React from \"react\";\n\nconst BigNameButton = (props: { title: string; color: string }) => {\n return (\n <div\n style={{\n padding: \"20px\",\n backgroundColor: props.color,\n }}\n >\n {props.title}\n </div>\n );\n};\n\nexport default BigNameButton;\n","import React, { useState } from \"react\";\n\nexport interface MyButtonProps {\n title: string;\n size: number;\n}\n\nconst MyNestedCustomComponent = (props: {\n text?: string;\n color?: string;\n other: MyButtonProps;\n}) => {\n const [state, setState] = useState(0);\n\n return (\n <div>\n <button onClick={() => setState(state + 1)}>Press me</button>\n <span>{`Count is ${state}`}</span>\n </div>\n );\n};\n\nexport default MyNestedCustomComponent;\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React, { useEffect } from \"react\";\nimport BigNameButton from \"./BigNameButton/BigNameButton\";\nimport MyNestedCustomComponent, {\n MyButtonProps,\n} from \"./my_nested_custom_component/my_nested_custom_component\";\nimport styles from \"./styles.module.css\";\n\n/**\n * Main Component Props\n */\nexport interface Props {\n message?: string;\n}\n/**\n * Main Component\n */\nfunction Greeting(props: Props) {\n useEffect(() => {\n console.log(\"Incoming message: \", props.message);\n }, [props.message]);\n\n return (\n <div className={styles.container}>{props.message ?? \"No Message\"}</div>\n );\n}\n\nconst MyCustomComponent = (props: { text?: string; color?: string }) => {\n return (\n <div\n style={{\n minHeight: \"100px\",\n minWidth: \"200px\",\n backgroundColor: `${props.color} 0.5`,\n }}\n >\n {props.text ?? \"No text here\"}\n </div>\n );\n};\n\nexport {\n BigNameButton,\n Greeting,\n MyButtonProps,\n MyCustomComponent,\n MyNestedCustomComponent,\n};\n"],"names":["useState","useEffect"],"mappings":";;;;AAEM,IAAA,aAAa,GAAG,UAAC,KAAuC,EAAA;IAC5D,QACE,KACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE;AACL,YAAA,OAAO,EAAE,MAAM;YACf,eAAe,EAAE,KAAK,CAAC,KAAK;AAC7B,SAAA,EAAA,EAEA,KAAK,CAAC,KAAK,CACR;AAEV;;ACNM,IAAA,uBAAuB,GAAG,UAAC,KAIhC,EAAA;IACO,IAAA,EAAA,GAAoBA,cAAQ,CAAC,CAAC,CAAC,EAA9B,KAAK,GAAA,EAAA,CAAA,CAAA,CAAA,EAAE,QAAQ,GAAA,EAAA,CAAA,CAAA,CAAe;AAErC,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,IAAA;AACE,QAAA,KAAA,CAAA,aAAA,CAAA,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KAAY,EAAA;;AAC5B,IAAAC,eAAS,CAAC,YAAA;QACR,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,KAAK,CAAC,OAAO,CAAC;AAClD,KAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AAEnB,IAAA,QACE,KAAK,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,MAAM,CAAC,SAAS,EAAA,EAAG,CAAA,EAAA,GAAA,KAAK,CAAC,OAAO,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,EAAA,GAAI,YAAY,CAAO;AAE3E;AAEM,IAAA,iBAAiB,GAAG,UAAC,KAAwC,EAAA;;IACjE,QACE,KACE,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE;AACL,YAAA,SAAS,EAAE,OAAO;AAClB,YAAA,QAAQ,EAAE,OAAO;AACjB,YAAA,eAAe,EAAE,EAAA,CAAA,MAAA,CAAG,KAAK,CAAC,KAAK,EAAM,MAAA,CAAA;SACtC,EAEA,EAAA,CAAA,EAAA,GAAA,KAAK,CAAC,IAAI,mCAAI,cAAc,CACzB;AAEV;;;;;;;","x_google_ignoreList":[2]}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
dist/index.min.js.map
+
1
-
1
View file @
d575c561
{"version":3,"file":"index.min.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/BigNameButton/BigNameButton.tsx","../src/index.tsx","../src/my_nested_custom_component/my_nested_custom_component.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React from \"react\";\n\nconst BigNameButton = (props: { title: string; color: string }) => {\n return (\n <div\n style={{\n padding: \"20px\",\n backgroundColor: props.color,\n }}\n >\n {props.title}\n </div>\n );\n};\n\nexport default BigNameButton;\n","import BigNameButton from \"BigNameButton/BigNameButton\";\nimport React, { useEffect } from \"react\";\nimport MyNestedCustomComponent, {\n MyButtonProps,\n} from \"./my_nested_custom_component/my_nested_custom_component\";\nimport styles from \"./styles.module.css\";\n\n/**\n * Main Component Props\n */\nexport interface Props {\n message?: string;\n}\n/**\n * Main Component\n */\nfunction Greeting(props: Props) {\n useEffect(() => {\n console.log(\"Incoming message: \", props.message);\n }, [props.message]);\n\n return (\n <div className={styles.container}>{props.message ?? \"No Message\"}</div>\n );\n}\n\nconst MyCustomComponent = (props: { text?: string; color?: string }) => {\n return (\n <div\n style={{\n minHeight: \"100px\",\n minWidth: \"200px\",\n backgroundColor: `${props.color} 0.5`,\n }}\n >\n {props.text ?? \"No text here\"}\n </div>\n );\n};\n\nexport {\n BigNameButton,\n Greeting,\n MyButtonProps,\n MyCustomComponent,\n MyNestedCustomComponent,\n};\n","import React, { useState } from \"react\";\n\nexport interface MyButtonProps {\n title: string;\n size: number;\n}\n\nconst MyNestedCustomComponent = (props: {\n text?: string;\n color?: string;\n other: MyButtonProps;\n}) => {\n const [state, setState] = useState(0);\n\n return (\n <div>\n <button onClick={() => setState(state + 1)}>Press me</button>\n <span>{`Count is ${state}`}</span>\n </div>\n );\n};\n\nexport default MyNestedCustomComponent;\n"],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","props","React","padding","backgroundColor","color","title","useEffect","console","log","message","className","styles","_a","minHeight","minWidth","concat","text","useState","state","setState","onClick"],"mappings":"4EAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAE,GAC9B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBU,CAqBxD,oFCvBsB,SAACe,GACrB,OACEC,EACET,cAAA,MAAA,CAAAD,MAAO,CACLW,QAAS,OACTC,gBAAiBH,EAAMI,QAGxBJ,EAAMK,MAGb,mBCGA,SAAkBL,SAKhB,OAJAM,EAAAA,WAAU,WACRC,QAAQC,IAAI,qBAAsBR,EAAMS,QAC1C,GAAG,CAACT,EAAMS,UAGRR,EAAKT,cAAA,MAAA,CAAAkB,UAAWC,GAAgC,QAAbC,EAAAZ,EAAMS,eAAO,IAAAG,EAAAA,EAAI,aAExD,4BAE0B,SAACZ,SACzB,OACEC,EACET,cAAA,MAAA,CAAAD,MAAO,CACLsB,UAAW,QACXC,SAAU,QACVX,gBAAiB,GAAAY,OAAGf,EAAMI,MAAW,kBAGtCQ,EAAAZ,EAAMgB,oBAAQ,eAGrB,kCC/BgC,SAAChB,GAKzB,IAAAY,EAAoBK,EAAAA,SAAS,GAA5BC,EAAKN,EAAA,GAAEO,EAAQP,EAAA,GAEtB,OACEX,EAAAT,cAAA,MAAA,KACES,EAAAT,cAAA,SAAA,CAAQ4B,QAAS,WAAM,OAAAD,EAASD,EAAQ,EAAE,GAAmB,YAC7DjB,EAAAT,cAAA,OAAA,KAAO,mBAAY0B,IAGzB","x_google_ignoreList":[0]}
\ No newline at end of file
{"version":3,"file":"index.min.js","sources":["../node_modules/style-inject/dist/style-inject.es.js","../src/BigNameButton/BigNameButton.tsx","../src/index.tsx","../src/my_nested_custom_component/my_nested_custom_component.tsx"],"sourcesContent":["function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React from \"react\";\n\nconst BigNameButton = (props: { title: string; color: string }) => {\n return (\n <div\n style={{\n padding: \"20px\",\n backgroundColor: props.color,\n }}\n >\n {props.title}\n </div>\n );\n};\n\nexport default BigNameButton;\n","import React, { useEffect } from \"react\";\nimport BigNameButton from \"./BigNameButton/BigNameButton\";\nimport MyNestedCustomComponent, {\n MyButtonProps,\n} from \"./my_nested_custom_component/my_nested_custom_component\";\nimport styles from \"./styles.module.css\";\n\n/**\n * Main Component Props\n */\nexport interface Props {\n message?: string;\n}\n/**\n * Main Component\n */\nfunction Greeting(props: Props) {\n useEffect(() => {\n console.log(\"Incoming message: \", props.message);\n }, [props.message]);\n\n return (\n <div className={styles.container}>{props.message ?? \"No Message\"}</div>\n );\n}\n\nconst MyCustomComponent = (props: { text?: string; color?: string }) => {\n return (\n <div\n style={{\n minHeight: \"100px\",\n minWidth: \"200px\",\n backgroundColor: `${props.color} 0.5`,\n }}\n >\n {props.text ?? \"No text here\"}\n </div>\n );\n};\n\nexport {\n BigNameButton,\n Greeting,\n MyButtonProps,\n MyCustomComponent,\n MyNestedCustomComponent,\n};\n","import React, { useState } from \"react\";\n\nexport interface MyButtonProps {\n title: string;\n size: number;\n}\n\nconst MyNestedCustomComponent = (props: {\n text?: string;\n color?: string;\n other: MyButtonProps;\n}) => {\n const [state, setState] = useState(0);\n\n return (\n <div>\n <button onClick={() => setState(state + 1)}>Press me</button>\n <span>{`Count is ${state}`}</span>\n </div>\n );\n};\n\nexport default MyNestedCustomComponent;\n"],"names":["css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","props","React","padding","backgroundColor","color","title","useEffect","console","log","message","className","styles","_a","minHeight","minWidth","concat","text","useState","state","setState","onClick"],"mappings":"4EAAA,SAAqBA,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAE,GAC9B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBU,CAqBxD,oFCvBsB,SAACe,GACrB,OACEC,EACET,cAAA,MAAA,CAAAD,MAAO,CACLW,QAAS,OACTC,gBAAiBH,EAAMI,QAGxBJ,EAAMK,MAGb,mBCGA,SAAkBL,SAKhB,OAJAM,EAAAA,WAAU,WACRC,QAAQC,IAAI,qBAAsBR,EAAMS,QAC1C,GAAG,CAACT,EAAMS,UAGRR,EAAKT,cAAA,MAAA,CAAAkB,UAAWC,GAAgC,QAAbC,EAAAZ,EAAMS,eAAO,IAAAG,EAAAA,EAAI,aAExD,4BAE0B,SAACZ,SACzB,OACEC,EACET,cAAA,MAAA,CAAAD,MAAO,CACLsB,UAAW,QACXC,SAAU,QACVX,gBAAiB,GAAAY,OAAGf,EAAMI,MAAW,kBAGtCQ,EAAAZ,EAAMgB,oBAAQ,eAGrB,kCC/BgC,SAAChB,GAKzB,IAAAY,EAAoBK,EAAAA,SAAS,GAA5BC,EAAKN,EAAA,GAAEO,EAAQP,EAAA,GAEtB,OACEX,EAAAT,cAAA,MAAA,KACES,EAAAT,cAAA,SAAA,CAAQ4B,QAAS,WAAM,OAAAD,EAASD,EAAQ,EAAE,GAAmB,YAC7DjB,EAAAT,cAAA,OAAA,KAAO,mBAAY0B,IAGzB","x_google_ignoreList":[0]}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/index.tsx
+
1
-
1
View file @
d575c561
import
BigNameButton
from
"
BigNameButton/BigNameButton
"
;
import
React
,
{
useEffect
}
from
"
react
"
;
import
BigNameButton
from
"
./BigNameButton/BigNameButton
"
;
import
MyNestedCustomComponent
,
{
MyButtonProps
,
}
from
"
./my_nested_custom_component/my_nested_custom_component
"
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets