UNPKG

rollpkg-example-package

Version:
1 lines 1.57 kB
{"version":3,"file":"rollpkg-example-package.cjs.development.js","sources":["../src/randomRGBColorGenerator.ts","../src/ColorBlock.tsx"],"sourcesContent":["const randomNumber0to255 = () => Math.floor(256 * Math.random());\n\ninterface RandomRGBColorGenerator {\n (): [number, number, number];\n}\n\nexport const randomRGBColorGenerator: RandomRGBColorGenerator = () => {\n const red = randomNumber0to255();\n const green = randomNumber0to255();\n const blue = randomNumber0to255();\n\n return [red, green, blue];\n};\n","import * as React from 'react';\n\ninterface ColorBlockProps {\n width: string;\n height: string;\n rgbColor: [number, number, number];\n}\n\nexport const ColorBlock: React.VFC<ColorBlockProps> = ({\n width,\n height,\n rgbColor,\n}) => <div style={{ width, height, backgroundColor: `rgb(${rgbColor})` }} />;\n\n// only add displayName in development to help with debugging\nif (process.env.NODE_ENV !== 'production') {\n ColorBlock.displayName = 'ColorBlock';\n}\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;MAMpD,uBAAuB,GAA4B;IAC9D,MAAM,GAAG,GAAG,kBAAkB,EAAE,CAAC;IACjC,MAAM,KAAK,GAAG,kBAAkB,EAAE,CAAC;IACnC,MAAM,IAAI,GAAG,kBAAkB,EAAE,CAAC;IAElC,OAAO,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;AAC5B;;MCJa,UAAU,GAA+B,CAAC,EACrD,KAAK,EACL,MAAM,EACN,QAAQ,GACT,KAAKA,wCAAK,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,QAAQ,GAAG,EAAE,IAAK;AAE7E;AACA,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;IACzC,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC;;;;;;"}