mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-08 12:32:58 +00:00
committed by
Nicolas Gallagher
parent
9d8d4057f6
commit
985c1d63b6
@@ -0,0 +1,26 @@
|
|||||||
|
/* eslint-disable react/prop-types */
|
||||||
|
import injectSheet from 'react-jss';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
const Dot = ({ classes, children }) => <div className={classes.root}>{children}</div>;
|
||||||
|
|
||||||
|
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);
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
import Box from './Box';
|
import Box from './Box';
|
||||||
|
import Dot from './Dot';
|
||||||
import Provider from './Provider';
|
import Provider from './Provider';
|
||||||
import View from './View';
|
import View from './View';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
Box,
|
Box,
|
||||||
|
Dot,
|
||||||
Provider,
|
Provider,
|
||||||
View
|
View
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user