diff --git a/packages/benchmarks/src/implementations/react-jss/Dot.js b/packages/benchmarks/src/implementations/react-jss/Dot.js new file mode 100644 index 00000000..3d1068fa --- /dev/null +++ b/packages/benchmarks/src/implementations/react-jss/Dot.js @@ -0,0 +1,26 @@ +/* eslint-disable react/prop-types */ +import injectSheet from 'react-jss'; +import React from 'react'; + +const Dot = ({ classes, children }) =>
{children}
; + +const styles = { + root: { + position: 'absolute', + cursor: 'pointer', + width: 0, + height: 0, + borderColor: 'transparent', + borderStyle: 'solid', + borderTopWidth: 0, + transform: 'translate(50%, 50%)', + borderBottomColor: ({ color }) => color, + borderRightWidth: ({ size }) => size / 2, + borderBottomWidth: ({ size }) => size / 2, + borderLeftWidth: ({ size }) => size / 2, + marginLeft: ({ x }) => x, + marginTop: ({ y }) => y + } +}; + +export default injectSheet(styles)(Dot); diff --git a/packages/benchmarks/src/implementations/react-jss/index.js b/packages/benchmarks/src/implementations/react-jss/index.js index 5a9541d8..f32ff155 100644 --- a/packages/benchmarks/src/implementations/react-jss/index.js +++ b/packages/benchmarks/src/implementations/react-jss/index.js @@ -1,9 +1,11 @@ import Box from './Box'; +import Dot from './Dot'; import Provider from './Provider'; import View from './View'; export default { Box, + Dot, Provider, View };